Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.bond.utils.BondDevice Class Reference

Public Member Functions

None __init__ (self, str device_id, dict[str, Any] attrs, dict[str, Any] props, dict[str, Any] state)
 
str __repr__ (self)
 
str|None branding_profile (self)
 
bool has_action (self, str action)
 
str|None location (self)
 
str name (self)
 
bool supports_close (self)
 
bool supports_direction (self)
 
bool supports_down_light (self)
 
bool supports_hold (self)
 
bool supports_light (self)
 
bool supports_open (self)
 
bool supports_set_brightness (self)
 
bool supports_set_position (self)
 
bool supports_speed (self)
 
bool supports_tilt_close (self)
 
bool supports_tilt_open (self)
 
bool supports_up_light (self)
 
str|None template (self)
 
bool trust_state (self)
 
str type (self)
 

Public Attributes

 device_id
 
 props
 
 state
 

Private Member Functions

bool _has_any_action (self, set[str] actions)
 

Private Attributes

 _attrs
 

Detailed Description

Helper device class to hold ID and attributes together.

Definition at line 20 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.bond.utils.BondDevice.__init__ (   self,
str  device_id,
dict[str, Any]  attrs,
dict[str, Any]  props,
dict[str, Any]  state 
)
Create a helper device from ID and attributes returned by API.

Definition at line 23 of file utils.py.

Member Function Documentation

◆ __repr__()

str homeassistant.components.bond.utils.BondDevice.__repr__ (   self)
Return readable representation of a bond device.

Definition at line 37 of file utils.py.

◆ _has_any_action()

bool homeassistant.components.bond.utils.BondDevice._has_any_action (   self,
set[str]  actions 
)
private
Check to see if the device supports any of the actions.

Definition at line 80 of file utils.py.

◆ branding_profile()

str | None homeassistant.components.bond.utils.BondDevice.branding_profile (   self)
Return this branding profile.

Definition at line 67 of file utils.py.

◆ has_action()

bool homeassistant.components.bond.utils.BondDevice.has_action (   self,
str  action 
)
Check to see if the device supports an actions.

Definition at line 76 of file utils.py.

◆ location()

str | None homeassistant.components.bond.utils.BondDevice.location (   self)
Get the location of this device.

Definition at line 57 of file utils.py.

◆ name()

str homeassistant.components.bond.utils.BondDevice.name (   self)
Get the name of this device.

Definition at line 47 of file utils.py.

◆ supports_close()

bool homeassistant.components.bond.utils.BondDevice.supports_close (   self)
Return True if this device supports closing.

Definition at line 100 of file utils.py.

◆ supports_direction()

bool homeassistant.components.bond.utils.BondDevice.supports_direction (   self)
Return True if this device supports any of the direction related commands.

Definition at line 88 of file utils.py.

◆ supports_down_light()

bool homeassistant.components.bond.utils.BondDevice.supports_down_light (   self)
Return true if the device has a down light.

Definition at line 124 of file utils.py.

◆ supports_hold()

bool homeassistant.components.bond.utils.BondDevice.supports_hold (   self)
Return True if this device supports hold aka stop.

Definition at line 112 of file utils.py.

◆ supports_light()

bool homeassistant.components.bond.utils.BondDevice.supports_light (   self)
Return True if this device supports any of the light related commands.

Definition at line 116 of file utils.py.

◆ supports_open()

bool homeassistant.components.bond.utils.BondDevice.supports_open (   self)
Return True if this device supports opening.

Definition at line 96 of file utils.py.

◆ supports_set_brightness()

bool homeassistant.components.bond.utils.BondDevice.supports_set_brightness (   self)
Return True if this device supports setting a light brightness.

Definition at line 130 of file utils.py.

◆ supports_set_position()

bool homeassistant.components.bond.utils.BondDevice.supports_set_position (   self)
Return True if this device supports setting the position.

Definition at line 92 of file utils.py.

◆ supports_speed()

bool homeassistant.components.bond.utils.BondDevice.supports_speed (   self)
Return True if this device supports any of the speed related commands.

Definition at line 84 of file utils.py.

◆ supports_tilt_close()

bool homeassistant.components.bond.utils.BondDevice.supports_tilt_close (   self)
Return True if this device supports tilt closing.

Definition at line 108 of file utils.py.

◆ supports_tilt_open()

bool homeassistant.components.bond.utils.BondDevice.supports_tilt_open (   self)
Return True if this device supports tilt opening.

Definition at line 104 of file utils.py.

◆ supports_up_light()

bool homeassistant.components.bond.utils.BondDevice.supports_up_light (   self)
Return true if the device has an up light.

Definition at line 120 of file utils.py.

◆ template()

str | None homeassistant.components.bond.utils.BondDevice.template (   self)
Return this model template.

Definition at line 62 of file utils.py.

◆ trust_state()

bool homeassistant.components.bond.utils.BondDevice.trust_state (   self)
Check if Trust State is turned on.

Definition at line 72 of file utils.py.

◆ type()

str homeassistant.components.bond.utils.BondDevice.type (   self)
Get the type of this device.

Definition at line 52 of file utils.py.

Member Data Documentation

◆ _attrs

homeassistant.components.bond.utils.BondDevice._attrs
private

Definition at line 34 of file utils.py.

◆ device_id

homeassistant.components.bond.utils.BondDevice.device_id

Definition at line 31 of file utils.py.

◆ props

homeassistant.components.bond.utils.BondDevice.props

Definition at line 32 of file utils.py.

◆ state

homeassistant.components.bond.utils.BondDevice.state

Definition at line 33 of file utils.py.


The documentation for this class was generated from the following file: