HomeyAPI~ManagerDevices.Device~CapabilityInstance

A CapabilityInstance can be used to integrate a two-way sync of capability states into your app.

Members

readonly device :HomeyAPI.ManagerDevices.Device

The Device to which this capability belongs

readonly capability

The CapabilityObj for this capability

readonly value :*

The current capability value or most recently pending requested value

readonly lastChanged :Date

The moment this capability last changed

readonly id :string

The Capability ID

readonly getable :boolean

True if this capability is gettable

readonly setable :boolean

True if this capability is settable

readonly values :Array.<string>

Array of values this capability can accept or undefined

readonly type :string

The type of the value of this capability

readonly min :number

The minimal value for this capability

readonly max :number

The maximal value for this capability

readonly decimals :number

The amount of decimals for this capability

readonly step :number

The step size for this capability

readonly title :string

The title of this capability

readonly units :string

The unit of this capability

readonly desc :Date

The description of this capability

Methods

destroy()

Detaches the capability listener and stops invoking the event callback

async setValue(value)

Sets the capability to the specified value.
Parameters:
Name Type Description
value * The new value