Extends
Properties
DISCOVERY_STRATEGIES
DISCOVERY_STRATEGIESDiscovery Strategies
Properties
Name | Type | Description |
---|---|---|
DISCOVERY_STRATEGIES
|
object | |
CLOUD
|
string | Cloud HTTPS, e.g. |
MDNS
|
string | Local HTTP, e.g. |
LOCAL
|
string | Local HTTP, e.g. |
LOCAL_SECURE
|
string | Local HTTPS, e.g. |
REMOTE_FORWARDED
|
string | Remote HTTPS, e.g. |
|
PLATFORMS
PLATFORMSPlatforms
Properties
Name | Type | Description |
---|---|---|
PLATFORMS
|
object | |
LOCAL
|
string | Homey (2016 — 2019) & Homey Pro (2019 — 2023) |
CLOUD
|
string | Homey Cloud |
|
Methods
__
__(input): string|nullTranslates an i18n-object (e.g. { en: 'My String', nl: 'Mijn tekst' }
to a string.
Uses the language of Homey as defined in Homey.
Parameters
Name | Type | Description |
---|---|---|
input
|
object | |
en
|
string | English translation |
nl
|
string | Dutch translation |
|
Returns
- The translated string, or null
string
|
null
Example
homeyApi.__({
en: 'Hello',
nl: 'Hallo',
fr: 'Bonjour',
}); // returns "Hello" if Homey is set to English
hasRole
hasRole(roleId)Check the current role.
Parameters
Name | Type | Description |
---|---|---|
roleId
|
string | The role ID, e.g. |