aiovantage.object_interfaces
¶
Object interfaces classes.
Object interface classes define how an object's state is accessed and modified. Each
object implements one or more interfaces, with all objects automatically supporting
ObjectInterface through inheritance
from SystemObject.
Object interfaces expose state properties, which represent dynamic attributes that change during the operation of the system, such as the level a light or the current temperature of a thermostat. These properties are distinct from configuration properties, which are set when the system is programmed from Design Center and remain fixed during normal operation.
State properties can be retrieved using fetch_state
and are kept up to date by calling handle_object_status
or handle_category_status when messages are received from the
command client event stream.
In practice, controllers are responsible for managing state properties. They handle the initial retrieval of state, process updates from the event stream, and ensure that the latest state is reflected in the system.
Classes:
-
AnemoSensorInterface–Anemo sensor object interface.
-
Interface–Base class for object interfaces.
-
BlindInterface–Blind object interface.
-
ButtonInterface–Button object interface.
-
ColorTemperatureInterface–Interface for querying and controlling color temperature.
-
ConfigurationInterface–Configuration object interface.
-
CurrentSensorInterface–Current sensor object interface.
-
FanInterface–Fan object interface.
-
GMemInterface–GMem object interface.
-
IntrospectionInterface–Introspection object interface.
-
LightSensorInterface–Light sensor object interface.
-
LoadInterface–Load object interface.
-
ObjectInterface–'Object' object interface.
-
PowerSensorInterface–Power sensor interface.
-
RGBLoadInterface–RGB load interface.
-
SensorInterface–Sensor interface.
-
SounderInterface–Sounder interface.
-
TaskInterface–Task interface.
-
TemperatureInterface–Temperature interface.
-
ThermostatInterface–Thermostat interface.
Interface
¶
Base class for object interfaces.
Methods:
-
invoke–Invoke a method on an object, and return the parsed response.
-
update_properties–Update object properties.
-
fetch_state–Fetch state properties provided by the interface(s) this object implements.
-
handle_object_status–Handle an object interface status message.
-
handle_category_status–Handle category status messages.
Attributes:
-
interface_name(str) –The name of the interface.
-
command_client(CommandClient | None) –The command client instance to use for making requests.
-
vid(int) –The Vantage ID of the object to send requests to, typically set in a subclass.
command_client
class-attribute
instance-attribute
¶
command_client: CommandClient | None = None
The command client instance to use for making requests.
vid
instance-attribute
¶
vid: int
The Vantage ID of the object to send requests to, typically set in a subclass.
invoke
async
¶
Invoke a method on an object, and return the parsed response.
Parameters:
-
method(str) –The method to invoke.
-
params(Any, default:()) –The parameters to send with the method.
-
as_type(type[T] | None, default:None) –The expected return type of the method, will attempt to infer if not provided.
Returns:
-
T | Any–A parsed response, or None if no response was expected.
update_properties
¶
fetch_state
async
¶
handle_object_status
¶
handle_category_status
¶
Handle category status messages.
Object interfaces which can handle "legacy" status messages from the Host Command service should override this method.
Parameters:
-
category(str) –The category of the status message, eg. "LOAD".
-
args(str, default:()) –The arguments that were sent with the command.
Returns:
BlindInterface
dataclass
¶
BlindInterface(*, shade_orientation: str | None = None)
Bases: Interface, ShadeOrientation, ShadeType
Blind object interface.
Classes:
-
BlindState–The state of a blind.
-
TravelTimes–The travel times of a blind.
Methods:
-
open–Open a blind.
-
close–Close a blind.
-
stop–Stop a blind.
-
set_position–Set the position of a blind.
-
get_position–Get the position of a blind.
-
set_tilt_angle–Set the tilt angle of a blind.
-
get_tilt_angle–Get the tilt angle of a blind.
-
tilt_clockwise–Tilt the blinds clockwise by the specified angle.
-
tilt_counter_clockwise–Tilt the shades counter-clockwise by the specified angle.
-
is_tilt_available–Check if the blind can tilt in its current state.
-
set_tilt_available–Set the cached tilt availability of a blind.
-
get_blind_state–Get the state of a blind.
-
set_upper_limit–Set the upper limit of a blind.
-
get_upper_limit–Get the upper limit of a blind.
-
set_lower_limit–Set the lower limit of a blind.
-
get_lower_limit–Get the lower limit of a blind.
-
get_travel_times–Get the travel times of a blind.
BlindState
dataclass
¶
BlindState(is_moving: bool, start_pos: Decimal, end_pos: Decimal, transition_time: Decimal, start_time: int)
The state of a blind.
TravelTimes
dataclass
¶
The travel times of a blind.
set_position
async
¶
get_position
async
¶
set_tilt_angle
async
¶
get_tilt_angle
async
¶
tilt_clockwise
async
¶
tilt_clockwise(angle: int) -> None
Tilt the blinds clockwise by the specified angle.
Parameters:
-
angle(int) –The angle offset the blinds should be tilted.
tilt_counter_clockwise
async
¶
tilt_counter_clockwise(angle: int) -> None
Tilt the shades counter-clockwise by the specified angle.
Parameters:
-
angle(int) –The angle offset the blinds should be tilted.
is_tilt_available
async
¶
is_tilt_available() -> bool
Check if the blind can tilt in its current state.
Returns:
-
bool–Whether the blind supports tilting.
set_tilt_available
async
¶
set_tilt_available(available: bool) -> None
Set the cached tilt availability of a blind.
Parameters:
-
available(bool) –Whether the blind supports tilting.
get_blind_state
async
¶
get_blind_state() -> BlindState
set_upper_limit
async
¶
get_upper_limit
async
¶
set_lower_limit
async
¶
get_lower_limit
async
¶
get_travel_times
async
¶
get_travel_times() -> TravelTimes
ButtonInterface
¶
Bases: Interface
Button object interface.
Classes:
Methods:
-
get_state–Get the state of a button.
-
set_state–Set the state of a button.
-
get_hold_on–Get the hold on time of a button.
-
set_hold_on–Set the hold on time of a button.
-
get_polarity–Get the polarity of a button.
-
set_polarity–Set the polarity of a button.
-
get_snd_type–Get the sound type of a button.
-
set_snd_type–Set the sound type of a button.
-
get_placement–Get the placement of a button.
-
set_placement–Set the placement of a button.
-
press–Press a button.
-
release–Release a button.
-
press_and_release–Press and release a button.
Attributes:
ColorTemperatureInterface
¶
Bases: Interface
Interface for querying and controlling color temperature.
Classes:
-
Preset–Color temperature preset.
Methods:
-
set_color_temp–Set the color temperature of a light.
-
get_color_temp–Get the color temperature of a light.
-
stop_transition–Stop any ongoing color temperature transitions.
-
warm–Decrease the color temperature of a light.
-
cool–Increase the color temperature of a light.
-
set_temperature_preset–Set the color temperature of a light to a preset value.
-
get_temperature_preset–Get the color temperature preset of a light.
-
get_max_value–Get the maximum color temperature of a light.
-
set_max_value–Set the cached maximum color temperature of a light.
-
get_min_value–Get the minimum color temperature of a light.
-
set_min_value–Set the cached minimum color temperature of a light.
-
get_transition_temperature–Get the current color temperature of a light in transition.
set_color_temp
async
¶
get_color_temp
async
¶
warm
async
¶
cool
async
¶
set_temperature_preset
async
¶
get_temperature_preset
async
¶
get_temperature_preset() -> Preset
Get the color temperature preset of a light.
Returns:
-
Preset–The color temperature preset of the light.
get_max_value
async
¶
set_max_value
async
¶
set_max_value(value: int) -> None
Set the cached maximum color temperature of a light.
Parameters:
-
value(int) –The maximum color temperature to set the light to, in Kelvin.
get_min_value
async
¶
ConfigurationInterface
¶
Bases: Interface
Configuration object interface.
Classes:
-
Store–Configuration store.
-
Compression–Configuration compression type.
-
SolarEvent–Solar event types.
Methods:
-
get_controller_vid–Get the VID of a controller, based on the controller number.
-
delete_object–Delete an object from the controller.
-
create_object–Create an object on the controller.
-
get_modification_time–Get the modification time of this object.
-
get_last_delete_time–Get the time of the last object deletion.
-
get_last_clear_time–Get the time of the last clear.
-
open_filter–Open a filter on a store.
-
get_next_object_vid–Get the VID of the next object in a filter.
-
close_filter–Close a filter.
-
find_local_object–Find a "local" object by VID, i.e. an object managed by this object.
-
get_time_zone–Get the time zone.
-
get_time_location–Get the time location.
-
get_astronomical_time–Get the astronomical time of a solar event.
get_controller_vid
async
¶
Get the VID of a controller, based on the controller number.
Parameters:
-
controller(int) –The controller number to get the VID of.
delete_object
async
¶
create_object
async
¶
get_modification_time
async
¶
get_modification_time() -> datetime
Get the modification time of this object.
Returns:
-
datetime–The modification time of the object, as a datetime object.
get_last_delete_time
async
¶
get_last_clear_time
async
¶
get_last_clear_time() -> datetime
Get the time of the last clear.
Returns:
-
datetime–The time of the last store clear, as a datetime object.
open_filter
async
¶
Open a filter on a store.
Parameters:
-
store(Store) –The store to open the filter on.
-
types(str, default:'') –An optional comma-separated list of object types to filter on.
-
xpath(str, default:'') –An optional xpath expression to filter on, eg. "/Load", "/*[@VID='12']"
Returns:
-
int–An integer "handle" representing the opened filter.
get_next_object_vid
async
¶
find_local_object
async
¶
get_time_zone
async
¶
get_time_zone() -> str
Get the time zone.
Returns:
-
str–The vantage time zone string, eg. "UTCPlusEight+8DAY,M3.2.0/02:00,M11.1.0/02:00"
get_astronomical_time
async
¶
get_astronomical_time(event: SolarEvent, year: int, month: int, day: int) -> datetime
Get the astronomical time of a solar event.
Parameters:
-
event(SolarEvent) –The solar event to get the time of.
-
year(int) –The year of the event.
-
month(int) –The month of the event.
-
day(int) –The day of the event.
Returns:
-
datetime–The time of the solar event, as a datetime object.
CurrentSensorInterface
¶
Bases: Interface
Current sensor object interface.
Methods:
-
get_current–Get the value of a current sensor.
-
set_current–Set the value of a current sensor.
get_current
async
¶
FanInterface
¶
Bases: Interface
Fan object interface.
Classes:
-
FanSpeed–Fan speed.
Methods:
-
get_speed–Get the speed of a fan.
-
set_speed–Set the speed of a fan.
-
increase_speed–Increase the speed of a fan.
-
decrease_speed–Decrease the speed of a fan.
GMemInterface
¶
Bases: Interface
GMem object interface.
Classes:
-
Buffer–Response from a GMem fetch operation.
Methods:
IntrospectionInterface
¶
Bases: Interface
Introspection object interface.
Classes:
-
Firmware–Firmware image.
-
LicenseType–License type.
-
LicenseInfo–A license info response.
Methods:
-
get_app_controllers–Get a list of controllers in application mode, excluding this controller.
-
get_firmware_version–Get the firmware version.
-
get_license_info–Get license information.
-
get_application_version–Get the application firmware version.
get_app_controllers
async
¶
get_app_controllers() -> str
Get a list of controllers in application mode, excluding this controller.
Returns:
-
str–A comma-separated list of controller numbers.
get_firmware_version
async
¶
get_license_info
async
¶
get_license_info(type: LicenseType) -> LicenseInfo
LoadInterface
¶
Bases: Interface
Load object interface.
Classes:
-
RampType–Load ramp type.
-
AlertState–Load alert state.
-
DimmingConfig–Load dimming config.
Methods:
-
set_level–Set the level of a load.
-
get_level–Get the level of a load.
-
ramp–Ramp a load to a level over a number of seconds.
-
set_profile–Set the id of the power profile used by this load.
-
get_profile–Get the id of the power profile used by this load.
-
get_override_level–Get the override level of a load.
-
ramp_auto_off–Ramp a load to a level over a number of seconds, then ramp off after a timeout.
-
get_alert_state–Get the alert state of a load.
-
set_alert_state–Set the cached alert state of a load.
-
get_dimming_config–Get the dimming configuration of a load.
-
turn_on–Turn on a load with an optional transition time.
-
turn_off–Turn off a load with an optional transition time.
Attributes:
set_level
async
¶
get_level
async
¶
ramp
async
¶
set_profile
async
¶
set_profile(profile: int) -> None
Set the id of the power profile used by this load.
Parameters:
-
profile(int) –The power profile id to set the load to.
get_profile
async
¶
get_profile() -> int
Get the id of the power profile used by this load.
Returns:
-
int–The power profile id used by the load.
get_override_level
async
¶
get_override_level() -> Decimal
Get the override level of a load.
Returns:
-
Decimal–The override level of the load, as a percentage (0-100).
ramp_auto_off
async
¶
ramp_auto_off(cmd: RampType, ramptime: float | Decimal, finallevel: float | Decimal, offcmd: RampType, offramptime: float | Decimal, offtimeout: float | Decimal) -> None
Ramp a load to a level over a number of seconds, then ramp off after a timeout.
Parameters:
-
cmd(RampType) –The type of ramp to perform.
-
ramptime(float | Decimal) –The number of seconds to ramp the load over.
-
finallevel(float | Decimal) –The level to ramp the load to (0-100).
-
offcmd(RampType) –The type of ramp to perform to turn the load off.
-
offramptime(float | Decimal) –The number of seconds to ramp the load off over.
-
offtimeout(float | Decimal) –The number of seconds to wait before turning the load off.
get_alert_state
async
¶
get_alert_state() -> AlertState
set_alert_state
async
¶
set_alert_state(alert_state: AlertState) -> None
Set the cached alert state of a load.
Parameters:
-
alert_state(AlertState) –The alert state to set the load to.
get_dimming_config
async
¶
get_dimming_config() -> DimmingConfig
Get the dimming configuration of a load.
Returns:
-
DimmingConfig–The dimming configuration of the load.
turn_on
async
¶
ObjectInterface
¶
Bases: Interface
'Object' object interface.
Methods:
-
get_vid–Get the Vantage ID of an object.
-
get_controller–Get the VID of the controller of an object.
-
get_type–Get the type of an object.
-
get_name–Get the name field of an object.
-
get_model–Get the model field of an object.
-
get_note–Get the note field of an object.
-
get_property–Get an integer property of an object.
-
get_property_ex–Get a string property of an object.
-
lock–Lock an object.
-
unlock–Unlock an object.
-
is_locked–Check if an object is locked.
-
is_interface_supported–Check if an interface is supported by an object.
-
is_method_supported–Check if a method is supported by an object.
-
set_property–Set an integer property of an object.
-
set_property_ex–Set a string property of an object.
-
is_enumerator_supported–Check if an enumerator is supported by an object.
-
get_m_time–Get the modification time of an object.
-
get_d_name–Get the display name of an object.
-
get_area–Get the area of an object.
-
get_supported_enum_values–Get all supported enum values of an object.
get_property
async
¶
get_property_ex
async
¶
is_interface_supported
async
¶
is_method_supported
async
¶
set_property
async
¶
set_property_ex
async
¶
is_enumerator_supported
async
¶
Check if an enumerator is supported by an object.
Parameters:
-
interface_name(str) –The name of the interface to check.
-
enumeration_name(str) –The name of the enumeration to check.
-
enumerator_name(str) –The name of the enumerator to check.
Returns:
-
bool–True if the enumerator is supported, False otherwise.
get_m_time
async
¶
get_m_time() -> datetime
Get the modification time of an object.
Returns:
-
datetime–The modification time of the object, as a datetime object.
RGBLoadInterface
¶
Bases: Interface
RGB load interface.
Classes:
-
RGBChannel–The RGB color channels.
-
HSLAttribute–The HSL color attributes.
-
ColorName–Color.
Methods:
-
set_rgb–Set the color of an RGB load.
-
get_rgb–Get a single RGB color channel of a load from the controller.
-
set_hsl–Set the color of an HSL load.
-
get_hsl–Get a single HSL color attribute of a load from the controller.
-
dissolve_rgb–Transition the color of an RGB load over a number of seconds.
-
dissolve_hsl–Transition the color of an HSL load over a number of seconds.
-
set_dissolve_rate–Set the default dissolve rate for RGB and HSL transitions.
-
get_dissolve_rate–Get the default dissolve rate for RGB and HSL transitions.
-
increment_rgb_component–Increment a single RGB color channel of a load.
-
decrement_rgb_component–Decrement a single RGB color channel of a load.
-
set_rgb_component–Set a single RGB(W) color channel of a load.
-
increment_hsl_attribute–Increment a single HSL color attribute of a load.
-
decrement_hsl_attribute–Decrement a single HSL color attribute of a load.
-
set_hsl_attribute–Set a single HSL color attribute of a load.
-
stop–Stop the transition.
-
next_preset–Change to the next lighting preset.
-
previous_preset–Change to the previous lighting preset.
-
next_effect–Change to the next lighting effect.
-
previous_effect–Change to the previous lighting effect.
-
set_preset–Change to a specific lighting preset.
-
get_preset–Get the current lighting preset.
-
set_effect–Change to a specific lighting effect.
-
get_effect–Get the current lighting effect.
-
set_color_by_name–Set the color of an RGB load by name.
-
get_color_name–Get the name of the color of a load from the controller.
-
get_color–Get the RGB/RGBW color of a load from the controller.
-
set_rgbw–Set the color of an RGBW load.
-
get_rgbw–Get a single RGBW color channel of a load from the controller.
-
get_transition_level–Get the transition level of a load.
-
dissolve_rgbw–Transition the color of an RGBW load over a number of seconds.
-
get_rgb_color–Get the RGB color of a load from the controller.
-
get_rgbw_color–Get the RGBW color of a load from the controller.
-
get_hsl_color–Get the HSL color of a load from the controller.
set_rgb
async
¶
set_rgb(red: int = 255, green: int = 255, blue: int = 255, *, sw: bool = False, follow_level: bool = False) -> None
Set the color of an RGB load.
Parameters:
-
red(int, default:255) –The red value of the color, (0-255)
-
green(int, default:255) –The green value of the color, (0-255)
-
blue(int, default:255) –The blue value of the color, (0-255)
-
sw(bool, default:False) –Set the cached value instead of the hardware value.
-
follow_level(bool, default:False) –Follow the level of the load.
get_rgb
async
¶
get_rgb(channel: RGBChannel, *, hw: bool = False) -> int
Get a single RGB color channel of a load from the controller.
Parameters:
-
channel(RGBChannel) –The channel to get the color of.
-
hw(bool, default:False) –Fetch the value from hardware instead of cache.
Returns:
-
int–The value of the RGB channel, 0-255.
set_hsl
async
¶
set_hsl(hue: int, saturation: float | Decimal, lightness: float | Decimal, *, sw: bool = False) -> None
Set the color of an HSL load.
Parameters:
-
hue(int) –The hue value of the color, in degrees (0-360).
-
saturation(float | Decimal) –The saturation value of the color, in percent (0-100).
-
lightness(float | Decimal) –The lightness value of the color, in percent (0-100).
-
sw(bool, default:False) –Set the cached value instead of the hardware value.
get_hsl
async
¶
get_hsl(attribute: HSLAttribute, *, hw: bool = False) -> int
Get a single HSL color attribute of a load from the controller.
Parameters:
-
attribute(HSLAttribute) –The attribute to get the value of.
-
hw(bool, default:False) –Fetch the value from hardware instead of cache.
Returns:
dissolve_rgb
async
¶
dissolve_rgb(red: int, green: int, blue: int, rate: float | Decimal, *, follow_level: bool = False) -> None
Transition the color of an RGB load over a number of seconds.
Parameters:
-
red(int) –The new red value of the color, (0-255)
-
green(int) –The new green value of the color, (0-255)
-
blue(int) –The new blue value of the color, (0-255)
-
rate(float | Decimal) –The number of seconds the transition should take.
-
follow_level(bool, default:False) –Follow the level of the load.
dissolve_hsl
async
¶
dissolve_hsl(hue: int, saturation: float | Decimal, lightness: float | Decimal, rate: float | Decimal) -> None
Transition the color of an HSL load over a number of seconds.
Parameters:
-
hue(int) –The new hue value of the color, in degrees (0-360).
-
saturation(float | Decimal) –The new saturation value of the color, in percent (0-100).
-
lightness(float | Decimal) –The new lightness value of the color, in percent (0-100).
-
rate(float | Decimal) –The number of seconds the transition should take.
set_dissolve_rate
async
¶
get_dissolve_rate
async
¶
increment_rgb_component
async
¶
increment_rgb_component(channel: RGBChannel) -> None
Increment a single RGB color channel of a load.
Parameters:
-
channel(RGBChannel) –The channel to increment the color of.
decrement_rgb_component
async
¶
decrement_rgb_component(channel: RGBChannel) -> None
Decrement a single RGB color channel of a load.
Parameters:
-
channel(RGBChannel) –The channel to decrement the color of.
set_rgb_component
async
¶
set_rgb_component(channel: RGBChannel, value: int) -> None
Set a single RGB(W) color channel of a load.
Parameters:
-
channel(RGBChannel) –The channel to set the color of.
-
value(int) –The value to set the channel to, 0-255.
increment_hsl_attribute
async
¶
increment_hsl_attribute(attribute: HSLAttribute) -> None
Increment a single HSL color attribute of a load.
Parameters:
-
attribute(HSLAttribute) –The attribute to increment the value of.
decrement_hsl_attribute
async
¶
decrement_hsl_attribute(attribute: HSLAttribute) -> None
Decrement a single HSL color attribute of a load.
Parameters:
-
attribute(HSLAttribute) –The attribute to decrement the value of.
set_hsl_attribute
async
¶
set_hsl_attribute(attribute: HSLAttribute, value: int) -> None
Set a single HSL color attribute of a load.
Parameters:
-
attribute(HSLAttribute) –The attribute to set the value of.
-
value(int) –The value to set the attribute to, 0-360 for hue, 0-100 for saturation and lightness.
set_preset
async
¶
get_preset
async
¶
set_effect
async
¶
get_effect
async
¶
set_color_by_name
async
¶
set_color_by_name(color: ColorName) -> None
Set the color of an RGB load by name.
Parameters:
-
color(ColorName) –The name of the color to set the load to.
get_color_name
async
¶
get_color_name() -> ColorName
Get the name of the color of a load from the controller.
Returns:
-
ColorName–The name of the color.
get_color
async
¶
set_rgbw
async
¶
set_rgbw(red: int = 255, green: int = 255, blue: int = 255, white: int = 255, *, sw: bool = False, follow_level: bool = False) -> None
Set the color of an RGBW load.
Parameters:
-
red(int, default:255) –The red value of the color, (0-255)
-
green(int, default:255) –The green value of the color, (0-255)
-
blue(int, default:255) –The blue value of the color, (0-255)
-
white(int, default:255) –The white value of the color, (0-255)
-
sw(bool, default:False) –Set the cached value instead of the hardware value.
-
follow_level(bool, default:False) –Follow the level of the load.
get_rgbw
async
¶
dissolve_rgbw
async
¶
dissolve_rgbw(red: int, green: int, blue: int, white: int, rate: float | Decimal, *, follow_level: bool = False) -> None
Transition the color of an RGBW load over a number of seconds.
Parameters:
-
red(int) –The new red value of the color, (0-255)
-
green(int) –The new green value of the color, (0-255)
-
blue(int) –The new blue value of the color, (0-255)
-
white(int) –The new white value of the color, (0-255)
-
rate(float | Decimal) –The number of seconds the transition should take.
-
follow_level(bool, default:False) –Follow the level of the load.
get_rgb_color
async
¶
get_rgbw_color
async
¶
SensorInterface
¶
Bases: Interface
Sensor interface.
Methods:
-
get_level–Get the level of a sensor.
-
set_level–Set the level of a sensor.
-
get_high_range–Get the high range of a sensor.
-
get_low_range–Get the low range of a sensor.
-
get_hold_on_time–Get the hold on time of a sensor.
-
is_tracking–Get whether the sensor is tracking.
-
get_tracking_delta–Get the tracking delta of a sensor.
-
get_tracking_min–Get the tracking min time of a sensor.
-
get_tracking_max–Get the tracking max time of a sensor.
get_level
async
¶
SounderInterface
¶
Bases: Interface
Sounder interface.
Classes:
-
Status–Sounder status.
Methods:
-
get_frequency–Get the frequency of the keypad speaker.
-
set_frequency–Set the frequency of the keypad speaker.
-
get_duration–Get the length of time the keypad speaker will sound.
-
set_duration–Set the length of time the keypad speaker will sound.
-
get_status–Get the status of the keypad speaker.
-
set_status–Set the status of the keypad speaker.
-
play_fx–Play a sound effect on the keypad speaker.
-
turn_on–Turn on the keypad speaker.
-
turn_off–Turn off the keypad speaker.
get_frequency
async
¶
set_frequency
async
¶
get_duration
async
¶
set_duration
async
¶
set_duration(duration: Decimal) -> None
Set the length of time the keypad speaker will sound.
Parameters:
-
duration(Decimal) –The duration to set the sounder to, in seconds.
get_status
async
¶
set_status
async
¶
set_status(status: Status) -> None
Set the status of the keypad speaker.
Parameters:
-
status(Status) –The status to set the keypad speaker to.
play_fx
async
¶
TaskInterface
¶
Bases: Interface
Task interface.
Classes:
-
Status–Task status.
Methods:
-
start–Start a task.
-
stop–Stop a running task.
-
cancel–Cancel a scheduled task.
-
is_running–Get the running state of a task.
-
get_state–Get the state of a task.
-
set_state–Set the state of a task.
-
get_status–Get the status of a task.
-
get_context_state–Get the context-aware task state.
-
has_context_state–Check if the task is context-aware.
TemperatureInterface
¶
ThermostatInterface
¶
Bases: Interface
Thermostat interface.
Classes:
-
OperationMode–Thermostat operation mode.
-
FanMode–Thermostat fan mode.
-
DayMode–Thermostat day mode.
-
HoldMode–The hold mode of the thermostat.
-
Status–The status of the thermostat.
Methods:
-
get_indoor_temperature–Get the current indoor temperature.
-
set_indoor_temperature–Set the cached indoor temperature.
-
get_outdoor_temperature–Get the current outdoor temperature.
-
set_outdoor_temperature–Set the cached outdoor temperature.
-
get_heat_set_point–Get the current heat set point.
-
set_heat_set_point–Set the current heat set point.
-
get_cool_set_point–Get the current cool set point.
-
set_cool_set_point–Set the current cool set point.
-
get_operation_mode–Get the current operation mode.
-
set_operation_mode–Set the current operation mode.
-
get_fan_mode–Get the current fan mode.
-
set_fan_mode–Set the current fan mode.
-
get_day_mode–Get the current day mode.
-
set_day_mode–Set the current day mode.
-
set_hold_mode–Set the current hold mode.
-
get_hold_mode–Get the current hold mode.
-
get_status–Get the current status.
-
set_status–Set the cached status.
-
get_auto_set_point–Get the current auto set point.
-
set_auto_set_point–Set the current auto set point.
get_indoor_temperature
async
¶
set_indoor_temperature
async
¶
get_outdoor_temperature
async
¶
set_outdoor_temperature
async
¶
get_heat_set_point
async
¶
set_heat_set_point
async
¶
get_cool_set_point
async
¶
set_cool_set_point
async
¶
get_operation_mode
async
¶
get_operation_mode(*, hw: bool = False) -> OperationMode
Get the current operation mode.
Parameters:
-
hw(bool, default:False) –Fetch the value from hardware instead of cache.
Returns:
-
OperationMode–The operation mode of the thermostat.