7.3 KiB
7.3 KiB
HomeApi
Properties
Name | Type | Default |
---|---|---|
api | Node |
Methods
Returns | Name |
---|---|
void | _notification ( what: Variant ) |
void | _on_connect ( ) |
void | _on_disconnect ( ) |
void | _ready ( ) |
Variant | get_device ( id: String ) |
Variant | get_devices ( ) |
Variant | get_state ( entity: String ) |
Variant | has_connected ( ) |
Variant | set_state ( entity: String, state: Variant, attributes: Dictionary ) |
void | start_adapter ( type: String, url: String, token: String ) |
Variant | watch_state ( entity: String, callback: Callable ) |
Property Descriptions
api: Node
No description provided yet.
Method Descriptions
_notification ( what: Variant ) -> void
No description provided yet.
_on_connect ( ) -> void
No description provided yet.
_on_disconnect ( ) -> void
No description provided yet.
_ready ( ) -> void
No description provided yet.
get_device ( id: String ) -> Variant
Get a single device by id
get_devices ( ) -> Variant
Get a list of all devices
get_state ( entity: String ) -> Variant
Returns the current state of an entity
has_connected ( ) -> Variant
No description provided yet.
set_state ( entity: String, state: Variant, attributes: Dictionary ) -> Variant
Updates the state of the entity and returns the resulting state
start_adapter ( type: String, url: String, token: String ) -> void
No description provided yet.
watch_state ( entity: String, callback: Callable ) -> Variant
Watches the state and each time it changes, calls the callback with the changed state, returns a function to stop watching the state