Device

Classes

Properties

available

available: boolean

Type

  • boolean

capabilities

capabilities: array

Type

  • array

capabilitiesObj

capabilitiesObj: object

Type

  • object

capabilitiesOptions

capabilitiesOptions: object

Type

  • object

class

class: string

Type

  • string

color

color: string

Type

  • string

data

data: object

Type

  • object

driverId

driverId: string

Type

  • string

driverUri

driverUri: string

Type

  • string

energy

energy: object

Type

  • object

energyObj

energyObj: object

Type

  • object

flags

flags: array

Type

  • array

icon

icon: string

Type

  • string

iconObj

iconObj: object

Type

  • object

iconOverride

iconOverride: string|null

Type

  • string | null

id

id: string

Type

  • string

images

images: array

Type

  • array

insights

insights: array

Type

  • array

name

name: string

Type

  • string

ready

ready: boolean

Type

  • boolean

repair

repair: boolean

Type

  • boolean

settings

settings: object

Type

  • object

settingsObj

settingsObj: boolean

Type

  • boolean

ui

ui: object

Type

  • object

uiIndicator

uiIndicator: string|null

Type

  • string | null

unavailableMessage

unavailableMessage: string

Type

  • string

unpair

unpair: boolean

Type

  • boolean

virtualClass

virtualClass: string|null

Type

  • string | null

zone

zone: string

Type

  • string

Methods

makeCapabilityInstance

makeCapabilityInstance(capabilityId, listener): HomeyAPIV2.ManagerDevices.Device.DeviceCapability

Creates an HomeyAPIV2.DeviceCapability for realtime capability updates.

Parameters

Name Type Description
capabilityId
string
listener
function
value
number | boolean | string
}

Returns

setCapabilityValue

setCapabilityValue(opts): Promise.<void>

Sets a capability's value.

Parameters

Name Type Description
opts
object
capabilityId
string
value
number | boolean | string
opts
object <optional>
duration
number <optional>
}
}

Returns

Promise.<void>

Events

delete

.on('delete')

update

.on('update')

Parameters

Name Type Description
device
object