HomeyAPI~ManagerDevices.Device

Properties:
Name Type Description
id string
name string
driverUri string
driverId string
zone string The id of the device's zone.
data object
icon string
iconObj object
Properties
Name Type Description
id string
url string
settings object
settingsObj boolean This property is true when there are settings, getable by the getDeviceSettingsObj method
class string
energy object
Properties
Name Type Description
approximation object
Properties
Name Type Description
usageOn number
usageOff number
usageConstant number
cumulative boolean
batteries Array.<string>
energyObj object
virtualClass object
ui object
Properties
Name Type Description
quickAction string Optional capabilityId of the quick action
components Array.<object>
Properties
Name Type Description
id string ID of the UI component
capabilities Array.<string> An array of capabilityIds
capabilities Array.<string>
capabilitiesObj Object.<string, object>
Properties
Name Type Description
[key].id string
[key].uri string
[key].title string
[key].desc string
[key].type string ("boolean" | "number" | "string" | "enum")
[key].getable boolean
[key].setable boolean
[key].chartType string ("line" | "area" | "stepLine" | "column" | "spline" | "splineArea" | "scatter")
[key].decimals number
[key].min number
[key].max number
[key].step number
[key].units string
[key].values Array.<object>
Properties
Name Type Description
id string
title string
[key].value object
[key].lastUpdated string
[key].options object
capabilitiesOptions object
flags Array.<string>
ready boolean A device is when the device's driver is available and ready.
available boolean A device can be available or unavailable, decided by the device's driver. If the driver is unavailable, the property `unavailableMessage` might be set. For example, a device can be unavailable when there is no wireless connection possible.
repair boolean If true, this device can be repaired using a repair PairSession.
unpair boolean If true, this device needs to be deleted using an unpair PairSession.
unavailableMessage string
images Array.<object>
Properties
Name Type Description
type string ("media" | "camera")
id string
imageObj HomeyAPI.ManagerImages.Image
insights Array.<object>
Properties
Name Type Description
uri string
id string
title string
titleTrue string
titleFalse string
units string
decimals number
color string

Methods

makeCapabilityInstance(capabilityId, listener) → {HomeyAPI.ManagerDevices.Device.CapabilityInstance}

Creates a new CapabilityInstance. A CapabilityInstance can be used to integrate a two-way sync of capability states into your app.
Parameters:
Name Type Description
capabilityId string The capability identifier
listener function A function to invoke when the capability is changed by anything other than the returned capabilityInstance

Events

$update

Fires when this instance has been updated.
Parameters:
Name Type Description
self this A self-reference

$delete

Fires when this instance has been deleted. After this event has fired, all listeners will be removed.

Classes

CapabilityInstance