Skip to content

v0.2.0 — guards are editable in the UI

Choose a tag to compare

@PeterLinuxOSS PeterLinuxOSS released this 02 Sep 08:29
· 93 commits to main since this release
06eef61

Guards moved into subentries

Guards used to live in the config entry's data as one opaque list, and Home
Assistant has no editor for that — so changing one guard meant rewriting all of
them. They are now the seventh subentry type, with a form of their own and a
section in the options menu.

This release migrates your config entry (version 2 → 3) on the first start:
guards move out of entry.data into subentries and the old key is deleted, so
there is one source rather than two. Nothing about their behaviour changes.

The migration has been run and verified on the author's own house: 6 guards,
127 → 133 subentries, byte-identical guard fingerprint including the
max_wait: null (wait indefinitely) versus unset distinction, and no blind
moved.

Also in this release

  • The guard form asks for the policy first, because the policy decides which
    fields exist — not just their defaults.
  • policy, wait_limit and on_timeout deliberately have no default: each
    offers choices that do opposite things.
  • je_noc's dawn offset re-measured against Home Assistant's own sun.sun
    rather than astral with elevation: sunrise - 21min, not - 15min.
  • HACS repository validation in CI, and brand assets.
  • tests/ha now actually runs in CI. It never had: every module guards itself
    with pytest.importorskip("homeassistant") and CI never installed Home
    Assistant, so roughly five thousand lines of config-flow, subentry-flow,
    options-flow and migration tests collected zero tests while the suite looked
    green.