Index
AirQualityState
Bases: NumericBaseState
Representation of a Home Assistant air_quality state.
See: https://www.home-assistant.io/integrations/air_quality/
Source code in src/hassette/models/states/air_quality.py
26 27 28 29 30 31 32 33 34 | |
AlarmControlPanelState
Bases: StringBaseState
Representation of a Home Assistant alarm_control_panel state.
See: https://www.home-assistant.io/integrations/alarm_control_panel/
Source code in src/hassette/models/states/alarm_control_panel.py
67 68 69 70 71 72 73 74 75 | |
AssistSatelliteState
Bases: StringBaseState
Representation of a Home Assistant assist_satellite state.
See: https://www.home-assistant.io/integrations/assist_satellite/
Source code in src/hassette/models/states/assist_satellite.py
6 7 8 9 10 11 12 | |
AutomationState
Bases: BoolBaseState
Representation of a Home Assistant automation state.
See: https://www.home-assistant.io/integrations/automation/
Source code in src/hassette/models/states/automation.py
24 25 26 27 28 29 30 31 32 | |
AttributesBase
Bases: BaseModel
Represents the attributes of a HomeAssistant state.
Source code in src/hassette/models/states/base.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
icon: str | None = Field(default=None, repr=False)
class-attribute
instance-attribute
The icon of the entity.
friendly_name: str | None = Field(default=None)
class-attribute
instance-attribute
A friendly name for the entity.
device_class: str | None = Field(default=None)
class-attribute
instance-attribute
The device class of the entity.
entity_id: list[str] | None = Field(default=None)
class-attribute
instance-attribute
List of entity IDs if this is a group entity.
supported_features: int | float | None = Field(default=None)
class-attribute
instance-attribute
Bitfield of supported features.
extras: dict[str, Any]
property
Integration-specific attributes not covered by the typed model.
extra(key: str, default: Any = None) -> Any
Get a single integration-specific attribute with a default.
Source code in src/hassette/models/states/base.py
58 59 60 | |
has_feature(flag: int) -> bool
Check whether flag is set in :pyattr:supported_features.
Source code in src/hassette/models/states/base.py
62 63 64 65 66 | |
BaseState
Bases: BaseModel, Generic[StateValueT]
Represents a Home Assistant state object.
Source code in src/hassette/models/states/base.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
value_type: type | tuple[type, ...] = (str, type(None))
class-attribute
The Python type of the state value, e.g. bool for BinarySensorState.
domain: str
instance-attribute
The domain of the entity, e.g. 'light', 'sensor', etc.
entity_id: str = Field(...)
class-attribute
instance-attribute
The full entity ID, e.g. 'light.living_room'.
last_changed: ZonedDateTime | None = Field(None)
class-attribute
instance-attribute
Time the state changed in the state machine, not updated when only attributes change.
last_reported: ZonedDateTime | None = Field(None)
class-attribute
instance-attribute
Time the state was written to the state machine, updated regardless of any changes to the state or state attributes.
last_updated: ZonedDateTime | None = Field(None)
class-attribute
instance-attribute
Time the state or state attributes changed in the state machine, not updated if neither state nor state attributes changed.
context: Context = Field(repr=False)
class-attribute
instance-attribute
The context of the state change.
is_unknown: bool = Field(default=False)
class-attribute
instance-attribute
Whether the state is 'unknown'.
is_unavailable: bool = Field(default=False)
class-attribute
instance-attribute
Whether the state is 'unavailable'.
value: StateValueT = Field(..., validation_alias=(AliasChoices('state', 'value')))
class-attribute
instance-attribute
The state value, e.g. 'on', 'off', 23.5, etc.
attributes: AttributesBase = Field(...)
class-attribute
instance-attribute
The attributes of the state.
is_group: bool
property
Whether this entity is a group entity (i.e. has multiple entity_ids).
extras: dict[str, Any]
property
Extra fields not covered by the typed state model.
extra(key: str, default: Any = None) -> Any
Get a single extra field with a default.
Source code in src/hassette/models/states/base.py
130 131 132 | |
get_domain() -> str
classmethod
Returns the domain string for this state class, extracted from the domain field annotation.
Source code in src/hassette/models/states/base.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
BoolBaseState
Base class for boolean states.
Valid state values are True, False, or None.
Will convert string values "on" and "off" to boolean True and False.
Source code in src/hassette/models/states/base.py
233 234 235 236 237 238 239 240 241 | |
Context
Bases: BaseModel
Represents the context of a Home Assistant event.
Source code in src/hassette/models/states/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 | |
id: str | None = Field(default=None)
class-attribute
instance-attribute
The context ID of the event.
parent_id: str | None = Field(default=None)
class-attribute
instance-attribute
The parent context ID of the event, if any.
user_id: str | None = Field(default=None)
class-attribute
instance-attribute
The user ID for who triggered the event.
DateTimeBaseState
Bases: BaseState[ZonedDateTime | PlainDateTime | Date | None]
Base class for datetime states.
Valid state values are ZonedDateTime, PlainDateTime, Date, or None.
Source code in src/hassette/models/states/base.py
215 216 217 218 219 220 221 | |
NumericBaseState
Bases: BaseState[int | float | Decimal | None]
Base class for numeric states.
Will convert string values to float, int, or Decimal. Valid state values are int, float, Decimal, or None.
Source code in src/hassette/models/states/base.py
244 245 246 247 248 249 250 251 | |
StringBaseState
TimeBaseState
Base class for Time states.
Valid state values are Time or None.
Source code in src/hassette/models/states/base.py
224 225 226 227 228 229 230 | |
BinarySensorState
Bases: BoolBaseState
Representation of a Home Assistant binary_sensor state.
See: https://www.home-assistant.io/integrations/binary_sensor/
Source code in src/hassette/models/states/binary_sensor.py
45 46 47 48 49 50 51 52 53 | |
ButtonState
Bases: StringBaseState
Representation of a Home Assistant button state.
See: https://www.home-assistant.io/integrations/button/
Source code in src/hassette/models/states/button.py
19 20 21 22 23 24 25 26 27 | |
CalendarState
Bases: StringBaseState
Representation of a Home Assistant calendar state.
See: https://www.home-assistant.io/integrations/calendar/
Source code in src/hassette/models/states/calendar.py
18 19 20 21 22 23 24 25 26 | |
CameraState
Bases: StringBaseState
Representation of a Home Assistant camera state.
See: https://www.home-assistant.io/integrations/camera/
Source code in src/hassette/models/states/camera.py
44 45 46 47 48 49 50 51 52 | |
ClimateState
Bases: StringBaseState
Representation of a Home Assistant climate state.
See: https://www.home-assistant.io/integrations/climate/
Source code in src/hassette/models/states/climate.py
106 107 108 109 110 111 112 113 114 | |
CounterState
Bases: NumericBaseState
Representation of a Home Assistant counter state.
See: https://www.home-assistant.io/integrations/counter/
Note
CounterState represents the live runtime value of a counter
entity. For the stored configuration (initial, minimum,
maximum, step, restore), use
:class:hassette.models.helpers.CounterRecord via
Api.list_counters/create_counter/update_counter.
Source code in src/hassette/models/states/counter.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
CoverState
Bases: StringBaseState
Representation of a Home Assistant cover state.
See: https://www.home-assistant.io/integrations/cover/
Source code in src/hassette/models/states/cover.py
81 82 83 84 85 86 87 88 89 | |
DateState
Bases: StringBaseState
Representation of a Home Assistant date state.
See: https://www.home-assistant.io/integrations/date/
Source code in src/hassette/models/states/date.py
13 14 15 16 17 18 19 20 21 | |
DateTimeState
Bases: StringBaseState
Representation of a Home Assistant datetime state.
See: https://www.home-assistant.io/integrations/datetime/
Source code in src/hassette/models/states/datetime.py
20 21 22 23 24 25 26 27 28 | |
DeviceTrackerState
Bases: StringBaseState
Representation of a Home Assistant device_tracker state.
See: https://www.home-assistant.io/integrations/device_tracker/
Source code in src/hassette/models/states/device_tracker.py
20 21 22 23 24 25 26 27 28 | |
EventState
Bases: StringBaseState
Representation of a Home Assistant event state.
See: https://www.home-assistant.io/integrations/event/
Source code in src/hassette/models/states/event.py
24 25 26 27 28 29 30 31 32 | |
FanState
Bases: BoolBaseState
Representation of a Home Assistant fan state.
See: https://www.home-assistant.io/integrations/fan/
Source code in src/hassette/models/states/fan.py
51 52 53 54 55 56 57 58 59 | |
GeoLocationState
Bases: NumericBaseState
Representation of a Home Assistant geo_location state.
See: https://www.home-assistant.io/integrations/geo_location/
Source code in src/hassette/models/states/geo_location.py
15 16 17 18 19 20 21 22 23 | |
HumidifierState
Bases: BoolBaseState
Representation of a Home Assistant humidifier state.
See: https://www.home-assistant.io/integrations/humidifier/
Source code in src/hassette/models/states/humidifier.py
41 42 43 44 45 46 47 48 49 | |
ImageState
Bases: StringBaseState
Representation of a Home Assistant image state.
See: https://www.home-assistant.io/integrations/image/
Source code in src/hassette/models/states/image.py
23 24 25 26 27 28 29 30 31 | |
ImageProcessingState
Bases: StringBaseState
Representation of a Home Assistant image_processing state.
See: https://www.home-assistant.io/integrations/image_processing/
Source code in src/hassette/models/states/image_processing.py
15 16 17 18 19 20 21 22 23 | |
InputAttributesBase
Bases: AttributesBase
Base attributes class for all input states.
Source code in src/hassette/models/states/input.py
11 12 13 14 | |
InputBooleanState
Bases: BoolBaseState
Representation of a Home Assistant input_boolean state.
See: https://www.home-assistant.io/integrations/input_boolean/
Source code in src/hassette/models/states/input.py
17 18 19 20 21 22 23 24 25 | |
InputButtonState
Bases: DateTimeBaseState
Representation of a Home Assistant input_button state.
See: https://www.home-assistant.io/integrations/input_button/
Source code in src/hassette/models/states/input.py
28 29 30 31 32 33 34 35 36 | |
InputDatetimeState
Bases: DateTimeBaseState
Representation of a Home Assistant input_datetime state.
See: https://www.home-assistant.io/integrations/input_datetime/
Source code in src/hassette/models/states/input.py
63 64 65 66 67 68 69 70 71 | |
InputNumberState
Bases: NumericBaseState
Representation of a Home Assistant input_number state.
See: https://www.home-assistant.io/integrations/input_number/
Source code in src/hassette/models/states/input.py
82 83 84 85 86 87 88 89 90 | |
InputSelectState
Bases: StringBaseState
Representation of a Home Assistant input_select state.
See: https://www.home-assistant.io/integrations/input_select/
Source code in src/hassette/models/states/input.py
97 98 99 100 101 102 103 104 105 | |
InputTextState
Bases: StringBaseState
Representation of a Home Assistant input_text state.
See: https://www.home-assistant.io/integrations/input_text/
Source code in src/hassette/models/states/input.py
115 116 117 118 119 120 121 122 123 | |
LawnMowerState
Bases: StringBaseState
Representation of a Home Assistant lawn_mower state.
See: https://www.home-assistant.io/integrations/lawn_mower/
Source code in src/hassette/models/states/lawn_mower.py
39 40 41 42 43 44 45 46 47 | |
LightState
Bases: BoolBaseState
Representation of a Home Assistant light state.
See: https://www.home-assistant.io/integrations/light/
Source code in src/hassette/models/states/light.py
56 57 58 59 60 61 62 63 64 | |
LockState
Bases: StringBaseState
Representation of a Home Assistant lock state.
See: https://www.home-assistant.io/integrations/lock/
Source code in src/hassette/models/states/lock.py
38 39 40 41 42 43 44 45 46 | |
MediaPlayerState
Bases: StringBaseState
Representation of a Home Assistant media_player state.
See: https://www.home-assistant.io/integrations/media_player/
Source code in src/hassette/models/states/media_player.py
241 242 243 244 245 246 247 248 249 | |
NumberState
Bases: NumericBaseState
Representation of a Home Assistant number state.
See: https://www.home-assistant.io/integrations/number/
Source code in src/hassette/models/states/number.py
89 90 91 92 93 94 95 96 97 | |
PersonState
Bases: StringBaseState
Representation of a Home Assistant person state.
See: https://www.home-assistant.io/integrations/person/
Source code in src/hassette/models/states/person.py
21 22 23 24 25 26 27 28 29 | |
RemoteState
Bases: BoolBaseState
Representation of a Home Assistant remote state.
See: https://www.home-assistant.io/integrations/remote/
Source code in src/hassette/models/states/remote.py
32 33 34 35 36 37 38 39 40 | |
SceneState
Bases: DateTimeBaseState
Representation of a Home Assistant scene state.
See: https://www.home-assistant.io/integrations/scene/
Source code in src/hassette/models/states/scene.py
6 7 8 9 10 11 12 | |
ScriptState
Bases: BoolBaseState
Representation of a Home Assistant script state.
See: https://www.home-assistant.io/integrations/script/
Source code in src/hassette/models/states/script.py
24 25 26 27 28 29 30 31 32 | |
SelectState
Bases: StringBaseState
Representation of a Home Assistant select state.
See: https://www.home-assistant.io/integrations/select/
Source code in src/hassette/models/states/select.py
13 14 15 16 17 18 19 20 21 | |
SensorState
Bases: StringBaseState
Representation of a Home Assistant sensor state.
See: https://www.home-assistant.io/integrations/sensor/
Source code in src/hassette/models/states/sensor.py
102 103 104 105 106 107 108 109 110 | |
AiTaskState
Bases: DateTimeBaseState
Representation of a Home Assistant ai_task state.
See: https://www.home-assistant.io/integrations/ai_task/
Source code in src/hassette/models/states/simple.py
6 7 8 9 10 11 12 | |
ConversationState
Bases: DateTimeBaseState
Representation of a Home Assistant conversation state.
See: https://www.home-assistant.io/integrations/conversation/
Source code in src/hassette/models/states/simple.py
15 16 17 18 19 20 21 | |
NotifyState
Bases: DateTimeBaseState
Representation of a Home Assistant notify state.
See: https://www.home-assistant.io/integrations/notify/
Source code in src/hassette/models/states/simple.py
24 25 26 27 28 29 30 | |
SttState
Bases: DateTimeBaseState
Representation of a Home Assistant stt state.
See: https://www.home-assistant.io/integrations/stt/
Source code in src/hassette/models/states/simple.py
33 34 35 36 37 38 39 | |
TtsState
Bases: DateTimeBaseState
Representation of a Home Assistant tts state.
See: https://www.home-assistant.io/integrations/tts/
Source code in src/hassette/models/states/simple.py
42 43 44 45 46 47 48 | |
SirenState
Bases: BoolBaseState
Representation of a Home Assistant siren state.
See: https://www.home-assistant.io/integrations/siren/
Source code in src/hassette/models/states/siren.py
41 42 43 44 45 46 47 48 49 | |
SunState
Bases: StringBaseState
Representation of a Home Assistant sun state.
See: https://www.home-assistant.io/integrations/sun/
Source code in src/hassette/models/states/sun.py
30 31 32 33 34 35 36 37 38 | |
SwitchState
Bases: BoolBaseState
Representation of a Home Assistant switch state.
See: https://www.home-assistant.io/integrations/switch/
Source code in src/hassette/models/states/switch.py
18 19 20 21 22 23 24 25 26 | |
TextState
Bases: StringBaseState
Representation of a Home Assistant text state.
See: https://www.home-assistant.io/integrations/text/
Source code in src/hassette/models/states/text.py
22 23 24 25 26 27 28 29 30 | |
TimeState
Bases: StringBaseState
Representation of a Home Assistant time state.
See: https://www.home-assistant.io/integrations/time/
Source code in src/hassette/models/states/time.py
13 14 15 16 17 18 19 20 21 | |
TimerState
Bases: StringBaseState
Representation of a Home Assistant timer state.
See: https://www.home-assistant.io/integrations/timer/
Source code in src/hassette/models/states/timer.py
25 26 27 28 29 30 31 32 33 | |
TodoState
Bases: NumericBaseState
Representation of a Home Assistant todo state.
See: https://www.home-assistant.io/integrations/todo/
Source code in src/hassette/models/states/todo.py
64 65 66 67 68 69 70 71 72 | |
UpdateState
Bases: StringBaseState
Representation of a Home Assistant update state.
See: https://www.home-assistant.io/integrations/update/
Source code in src/hassette/models/states/update.py
54 55 56 57 58 59 60 61 62 | |
VacuumState
Bases: StringBaseState
Representation of a Home Assistant vacuum state.
See: https://www.home-assistant.io/integrations/vacuum/
Source code in src/hassette/models/states/vacuum.py
104 105 106 107 108 109 110 111 112 | |
ValveState
Bases: StringBaseState
Representation of a Home Assistant valve state.
See: https://www.home-assistant.io/integrations/valve/
Source code in src/hassette/models/states/valve.py
13 14 15 16 17 18 19 20 21 | |
WaterHeaterState
Bases: StringBaseState
Representation of a Home Assistant water_heater state.
See: https://www.home-assistant.io/integrations/water_heater/
Source code in src/hassette/models/states/water_heater.py
47 48 49 50 51 52 53 54 55 | |
WeatherState
Bases: StringBaseState
Representation of a Home Assistant weather state.
See: https://www.home-assistant.io/integrations/weather/
Source code in src/hassette/models/states/weather.py
49 50 51 52 53 54 55 56 57 | |
ZoneState
Bases: NumericBaseState
Representation of a Home Assistant zone state.
See: https://www.home-assistant.io/integrations/zone/
Source code in src/hassette/models/states/zone.py
17 18 19 20 21 22 23 24 25 | |