Skip to content

v0.49.0

Choose a tag to compare

@nodejsmith-release-please nodejsmith-release-please released this 16 Jul 02:18
535e1c4

⚠ BREAKING CHANGES

  • Registration signatures frozenname is now a required keyword-only argument on every Bus and Scheduler registration method (on_state_change, on_attribute_change, on_call_service, on, on_homeassistant_*, on_websocket_*, on_app_*, on_hassette_service_*, schedule, run_in, run_once, run_every, run_minutely, run_hourly, run_daily, run_cron) and their sync facades. Omitting name raises TypeError instead of the old ListenerNameRequiredError — Pyright catches this at development time. All optional parameters must be passed by keyword. Update call sites to pass name="..." explicitly and convert any positional group=/jitter=/timeout=/timeout_disabled=/if_past= arguments to keyword form. (#1301)
  • DomainStates keys/values are lazy iteratorsDomainStates.keys() and .values() now return iterators instead of lists, matching items() and __iter__. Code that calls len(), indexes, or iterates multiple times must wrap the result in list(). iterkeys() and itervalues() are removed. (#1325)
  • Entity type aliases renamed with domain prefixesFormatCameraFormat, DirectionFanDirection, FlashLightFlash, EnqueueMediaPlayerEnqueue, RepeatMediaPlayerRepeat, CommandTypeRemoteCommandType, StatusTodoStatus, TypeWeatherType. Update imports to the new names. (#1306)
  • Event factory classmethods renamedHassetteServiceEvent.from_data()from_service_status(), HassetteAppStateEvent.from_data()from_app(), HassetteSimpleEvent.create_event()from_topic(), HassetteFileWatcherEvent.create_event()from_paths(). Update any code constructing these events directly. (#1306)
  • ResourceRole string values lowercased"Core", "Service", "App", "Base", "Resource", "Unknown" changed to "core", "service", "app", "base", "resource", "unknown". Code comparing role == "Core" must switch to lowercase. Enum member names are unchanged. (#1306)
  • Api.get_state_value_typed() removed — also removed from ApiSyncFacade, RecordingApi, and RecordingApiSyncFacade. Use get_state().value for a typed value or get_state_value() for the raw string. (#1306)
  • Api.toggle_service renamed to toggle — also renamed on ApiSyncFacade, RecordingApi, and RecordingApiSyncFacade. Update calls from api.toggle_service(...) to api.toggle(...). (#1321)
  • Timezone utility functions renamedconvert_datetime_str_to_system_tzconvert_datetime_str_to_tz, convert_utc_timestamp_to_system_tzconvert_utc_timestamp_to_tz. Behavior unchanged when HassetteConfig.timezone is unset. (#1327)
  • Pre-v1 backwards compatibility shims removed — deprecated aliases and transitional APIs are gone. (#1308)

Features

  • add configurable timezone for wall-clock scheduling — Daily and Cron triggers respect HassetteConfig.timezone, defaulting to the system timezone (#1327)
  • auto-derive service domain from entity ID and return typed results from entity methods — the manual domain parameter is no longer needed on call_service() (#1321)

Bug Fixes

  • cli: fix --since flag crash on all CLI commands (#1290)
  • preserve telemetry data during schema migrations instead of dropping it (#1298)

Refactoring

  • App's public API surface reduced — lifecycle machinery extracted to module-level functions; App exposes ~20 names in autocomplete instead of ~54, hiding framework internals from app authors (#1314)