xs1_api_client.device package¶
Submodules¶
xs1_api_client.device.base module¶
-
class
xs1_api_client.device.base.
XS1Device
(state: dict, api_interface)[source]¶ Bases:
object
This is a generic XS1 device, all other objetcs inherit from this.
-
new_value
()[source]¶ Returns the new value to set for this device. If this value differs from the currrent value the gateway is still trying to update the value on the device. If it does not differ the value has already been set.
Returns: the new value to set for this device
-
set_state
(new_state: dict)[source]¶ Sets a new state for this device. If there is an existing state, new and old values will be merged to retain any information that was missing from api responses.
Parameters: new_state – new representation of this device (api response)
-
set_value
(value)[source]¶ Sets a new value for this device. This method should be implemented by inheriting classes.
Parameters: value – the new value to set
-