v0.20.0
[0.20.0] - 2026-02-01
Added
- Add --version/-v argument to Hassette to allow displaying the current version
- Add
__iter__,__contains__,keys,values, anditemsmethods to StateManager and StateRegistry - Add functionality to route
state_changeevents to more specific handlers based on domain and/or entity_id- This is done automatically by the
Busby adding the entity_id to the topic when creating the listener - Matched listeners are deduplicated to ensure delivery only happens one time
- Events are dispatched to the most specific route if there are multiple matches
- This is done automatically by the
- Add
AnnotationConverterclass andTypeMatcherclass for more robust validation/conversion during DI - Add A, P, C, and D aliases to
hassette.__init__for simpler importsA=hassette.event_handling.accessorsP=hassette.event_handling.predicatesC=hassette.event_handling.conditionsD=hassette.event_handling.dependencies
- Add new
Comparisoncondition for basic operators (e.g.==,!=,<,>, etc.) to compare values in state/attribute change listeners - Add new accessors for getting multiple/all attributes at once from state change events
get_attrs_<old|new|old_new>- specify a list of attrsget_all_attrs_<old|new|old_new>- get all attributes as a dict
- Add
get_all_changesaccessor that returns a dictionary of all changes, including state and all attributes
Fixed
- Fix AppHandler reporting failed apps as successful by using status attribute
- This is due to some issues with how we're tracking apps, further fixes will need to happen in future releases
- Fix StateManager using
BaseStatewhen we do not find a class in theStateRegistry- This does not work because
BaseStatedoesn't have adomain - Error is now raised instead
- This does not work because
- Log level is now used by Apps if set directly in AppConfig in Python code (as opposed to config file)
- Fix HassPayload's context attribute not being a HassContext instance
MediaPlayerStatenow hasattributesusing the correct type
Changed
- BREAKING: Replaced
StateManager.get_stateswith__getitem__that accepts a state class- The error raised in StateManager when a state class is not found in the
StateRegistrynow advises to use this method
- The error raised in StateManager when a state class is not found in the
- Renamed
LOG_LEVELStoLOG_LEVEL_TYPE - Renamed
get_default_dicttoget_defaults_dictto be more clear this is not referring todefaultdictclass - Use same validation for
AppConfiglog level as we do forHassetteconfig log level - Extracted nested Attributes classes for each state out of class definition to make them first class citizens
- e.g.
MediaPlayerState.Attributesis nowMediaPlayerAttributes
- e.g.
Docs
- Remove
Why Hassettepage - Remove docker networking page
- Very large cleanup/reorg/addition of docs
Full Changelog: v0.19.2...v0.20.0