github sfox38/Time_Off v2.0.8
Time Off v2.0.8

3 hours ago

v2.0.8

  • [Fix] Connectivity blips no longer destroy running timers - previously, a device dropping to unavailable mid-countdown (a Zigbee/Wi-Fi blip, or its integration reloading) cancelled the countdown, and the device coming back on started a fresh timer from the Time Off default - silently discarding a custom set_off_after duration and extending the total on-time. Blips are now ignored: the countdown keeps running and resumes untouched when the device returns. A device that comes back off cancels the countdown cleanly, and one that reappears on with no countdown running (e.g. power restored at a wall switch) still auto-starts as before.
  • [Fix] Race between arming and the device turning off - if the device was turned off in the brief window while a new countdown's expiry was being written to storage, the countdown armed anyway and later fired a spurious turn-off plus time_off_timer_expired event. The device state is now re-checked after the write.
  • [Improvement] Startup recovery is event-driven - instead of always sleeping a fixed 30 seconds before acting on a recovered timer, Time Off now acts as soon as the managed device reports a real state; the 30-second cap remains as a fallback for devices that never do. Recovery after a reload is effectively instant, and device turn-ons during the old fixed window are no longer silently ignored.
  • [Improvement] remaining attribute excluded from recorder history - the Timer Active sensor's remaining attribute refreshes every 30 seconds while a timer runs; it is now excluded from long-term history so it no longer stores a new attribute blob per tick. expiry is still recorded.
  • [Doc] Corrected start_timer documentation - the README claimed start_timer always restarts from the Time Off default; it actually honours a custom duration pre-set via set_off_after (and always has - a regression test now locks the intended behaviour in).
  • [Internal] Cleanup pass - removed dead test helpers left over from the pre-2.0.7 architecture, the duplicate VERSION constant (manifest.json is now the single source), a private re-export kept only for the test suite, a redundant dispatcher notification per timer arm, and stale comments; modernised config_flow.py and device_trigger.py (type hints, import order) to match the rest of the codebase; added a ruff lint job to CI and import sorting across the repo; new regression tests for the blip semantics, the arming race, the start_timer/set_off_after interaction, the recovery grace window, and mid-loop duration changes in Trigger Only mode.

Don't miss a new Time_Off release

NewReleases is sending notifications on new releases.