Extends
Classes
- Item
- Manager
- ManagerAlarms
- ManagerApi
- ManagerApps
- ManagerArp
- ManagerBLE
- ManagerBackup
- ManagerClock
- ManagerCloud
- ManagerCoprocessor
- ManagerCron
- ManagerDatabase
- ManagerDevices
- ManagerDevkit
- ManagerDiscovery
- ManagerDrivers
- ManagerEnergy
- ManagerExperiments
- ManagerFlow
- ManagerFlowToken
- ManagerGeolocation
- ManagerGoogleAssistant
- ManagerI18n
- ManagerIcons
- ManagerImages
- ManagerInsights
- ManagerLedring
- ManagerLogic
- ManagerMatter
- ManagerMobile
- ManagerNotifications
- ManagerPresence
- ManagerRF
- ManagerSafety
- ManagerSatellites
- ManagerSecurity
- ManagerSessions
- ManagerSystem
- ManagerThread
- ManagerUpdates
- ManagerUsers
- ManagerVirtualDevice
- ManagerWeather
- ManagerWebserver
- ManagerZigbee
- ManagerZones
- ManagerZwave
Instance 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. |
isConnected
isConnected(): BooleanIf Homey is connected to Socket.io.
Returns
Boolean