Skip to content

v0.53.0

Choose a tag to compare

@nodejsmith-release-please nodejsmith-release-please released this 04 Sep 01:20
900a9a6

⚠ BREAKING CHANGES

  • hassette.test_utils no longer exists. Public (Tier 1) symbols move to hassette.testing; everything else moves to tests.support (internal-only, not shipped in the wheel — not usable outside this repo).

    Public API — update the import path only

    • ApiCall, AppConfigurationError, AppTestHarness, DrainError,
      DrainFailure,
      DrainTimeout, RecordingApi, create_call_service_event,
      create_state_change_event,
      dummy_cache, make_light_state_dict, make_sensor_state_dict,
      make_state_dict,
      make_switch_state_dict, make_test_config, make_typed_state now
      import from
      hassette.testing instead of hassette.test_utils.

    Public API — newly promoted to Tier 1 (previously internal-only)

    • EventCapture, HassetteHarness, build_harness,
      make_full_state_change_event,
      wait_for are now part of the supported hassette.testing surface.

    Removed from the public surface

    • make_mock_hassette was previously in hassette.test_utils.__all__;
      it is now
      internal-only (tests.support.mock_hassette, not shipped in the wheel).
      External consumers
      using it should build their own Hassette stub, or open an issue if
      this needs to remain
      public.

    Internal-only, no longer importable at all outside this repo

    • Every symbol not listed above (web-layer factories, seed scenario
      helpers, SQL/uvicorn test
      servers, FakeStateReader, create_app_manifest, make_addrinfo,
      patch_loop_getaddrinfo,
      etc.) is no longer part of the wheel. It lived at
      hassette.test_utils.* before; it now lives
      at tests.support.* inside this repository only.
  • SensorAttributes no longer declares native_value, native_unit_of_measurement, or suggested_display_precision (they duplicated the base State.value/unit_of_measurement fields and are removed for the sensor domain only). StateRegistry.register and register_state_converter drop their unused device_class keyword parameter, and StateKey drops its device_class field (kept as a one-field frozen dataclass with domain only — its export names and isinstance checks are unchanged).

    What changes for callers

    • Code reading sensor_state.attributes.native_value,
      .native_unit_of_measurement, or .suggested_display_precision must
      switch to sensor_state.value and
      sensor_state.attributes.unit_of_measurement — those fields already
      carried the same data.
    • Code calling StateRegistry.register(..., device_class=...),
      StateRegistry.resolve(..., device_class=...), or
      register_state_converter(..., device_class=...) must drop the
      device_class keyword — it was never populated or read by any
      production call site.
    • Code constructing StateKey(domain=..., device_class=...) directly
      must drop device_classStateKey is now StateKey(domain) only.

Features

  • add device-class-specific sensor state subtypes (#1549) (e93d877), closes #717
  • add per-instance app restart instead of full app-key restart (#1687) (d84aa21), closes #796
  • add per-instance start/stop/reload to frontend and CLI (#1873) (e1c2fc0), closes #1860
  • log elapsed time per shutdown phase for diagnostics (#1766) (1bde18a), closes #1736

Bug Fixes

  • align duration log precision in shutdown path (#1789) (a01286e), closes #1765
  • fix batch of small backend/frontend issues: jobs API fire_at display for non-jittered jobs, app_activity default time window, CLI error framing for malformed 2xx responses, duplicate app-init error logs, log-table key collisions on seq: 0, and query-param parsing edge cases (#1872) (1e14d5c)
  • enforce status exhaustiveness and fix degraded/skipped status gaps (#1671) (6b65780), closes #1608 #1670
  • handle SIGINT for graceful shutdown instead of silent hang (#1863) (4ad05a8), closes #1815
  • keep non-active handler health cards out of the tab order (#1742) (312a9d0), closes #1709
  • prevent restart after unconfirmed resource teardown (#1723) (fb54e48), closes #1696
  • route captured warnings through the logging pipeline (#1864) (67cbf38), closes #1816
  • harden shutdown/restart: bound service-watcher event dispatch with a timeout, distinguish cancellation causes during resource cleanup, and preserve terminal-status evidence on forced termination (#1802) (64a1b42), closes #1795
  • widen int/enum-typed state attributes HA platforms violate (#1775) (cc2ffff), closes #1751 #1752

Performance Improvements

  • remove state_changed WebSocket broadcast to browser clients (#1639) (0878132)
  • ui: scope AppDetailPage store selectors to its own app (#1528) (54affbd), closes #1465
  • ui: scope execution-completion subscriptions in app-detail children (#1607) (3a84864), closes #1542

Documentation