xs1_api_client.device.actuator package

Submodules

xs1_api_client.device.actuator.switch module

class xs1_api_client.device.actuator.switch.XS1Switch(state, api)[source]

Bases: xs1_api_client.device.actuator.XS1Actuator

Represents a XS1 Switch.

turn_off() → None[source]

Turns off the switch.

turn_on() → None[source]

Turns on the switch.

xs1_api_client.device.actuator.thermostat module

class xs1_api_client.device.actuator.thermostat.XS1Thermostat(state, api)[source]

Bases: xs1_api_client.device.actuator.XS1Actuator

Represents a basic XS1 Actuator, there may be special variants for some types.

set_temperature(temp: float) → None[source]

Sets the new target temperature of this thermostat

Parameters:temp – new target temperature

Module contents

class xs1_api_client.device.actuator.XS1Actuator(state, api)[source]

Bases: xs1_api_client.device.XS1Device

Represents a basic XS1 Actuator, there may be special variants for some types.

call_function(xs1_function)[source]

Calls the specified function by id and saves the api response as the new state

Parameters:xs1_function – XS1Function object
get_function_by_id(func_id)[source]

Get a function by it’s id :param func_id: function id :return: XS1Function or None

get_function_by_type(func_type: xs1_api_client.api_constants.FunctionType)[source]

Get a function by it’s type :param func_type: function type :return: XS1Function or None

get_functions() → [][source]
Returns:a list of functions that can be executed using the call_function() method
set_name(name: str)[source]

Sets a new name for this device. Keep in mind that there are some limitations for a device name.

Parameters:name – the new name to set
Returns:the new name of the actuator
set_value(value) → None[source]

Sets a new value for this actuator

Parameters:value – new value to set
update() → None[source]

Updates the state of this actuator

class xs1_api_client.device.actuator.XS1Function(actuator: xs1_api_client.device.actuator.XS1Actuator, function_id: int, function_type: xs1_api_client.api_constants.FunctionType, description: str)[source]

Bases: object

Represents a function of a XS1Actuator.

description() → str[source]
Returns:a description for this function
execute() → None[source]

Executes this function and sets the response as the new actuator value

id() → int[source]
Returns:the id of this function (note that this id is only unique for a single actuator!)
type() → xs1_api_client.api_constants.FunctionType[source]
Returns:the type of this function