Extends
Properties
lastChanged
lastChanged: Date|nullType
- Date | null
value
value: boolean|number|string|nullType
- boolean | number | string | null
Methods
addListener
addListener(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
destroy
destroy()Destroy this capability listener, and if it's the last one, unsubscribe from the device's realtime events.
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
off
off(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
on
on(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
once
once(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
removeAllListeners
removeAllListeners(event)Parameters
Name | Type | Description |
---|---|---|
event
|
string |
removeListener
removeListener(event, callback)Shortcut to EventEmitter#off
Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
setValue
(async) setValue(value, opts)Sets a new capability value.
Parameters
Name | Type | Description |
---|---|---|
value
|
boolean | number | string | The new capability value |
opts
|
object |