Sync delta from autoclean-orphan-companion-entities into the canonical
coordinator-scheduling spec (one new requirement: pruned sources have
their companion device removed). Move the change directory under
openspec/changes/archive/.
Update HANDOFF.md: v0.1.4 is current release; the orphan-companion-
entity gap is closed for future prunes; legacy orphans (from before
v0.1.4) remain a manual-cleanup item.
Co-authored-by: Cursor <cursoragent@cursor.com>
Proposes that prune_removed_older_than's pruned-unique_ids return value
drives a device-registry purge step in both prune call sites
(_async_registry_changed action:remove and _handle_tick), removing the
per-source companion device whose identifiers={(DOMAIN, source_uid)}.
HA's device-registry removal cascades to the entity registry and
removes the eight orphan companion entries automatically.
Modifies coordinator-scheduling capability with one new requirement
covering the cleanup behavior, including the no-op-on-missing-device
and the keep-during-grace-window scenarios.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync delta from defer-cold-start-backfill into the canonical
coordinator-scheduling spec (two new requirements: non-blocking
cold-start, exactly-once batch-completion notification). Move the
change directory under openspec/changes/archive/.
Update HANDOFF.md: v0.1.3 is current release; the multi-minute
setup freeze is fixed; brand/logo polish shipped; live-install
manual-validation gates 10.2-10.5 still open.
Co-authored-by: Cursor <cursoragent@cursor.com>
Proposes deferring cold-start backfill out of the await chain of
async_setup so config-entry setup returns sub-second regardless of
how many batteries need historical replaced_on lookup. Adds a single
persistent notification when the initial backfill batch completes,
and softens the v0.1.1 all-caps freeze warning in the config dialog
to match the new background-backfill behaviour.
Modifies coordinator-scheduling capability with two new requirements
(non-blocking setup, exactly-once batch-completion notification).
No changes to replacement-detection contract.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Move openspec/changes/optimize-coordinator-tick to
openspec/changes/archive/2026-05-09-optimize-coordinator-tick.
- Sync the change's coordinator-scheduling delta to
openspec/specs/coordinator-scheduling/spec.md so future agents have
the heartbeat / per-event publish contract in main specs.
- HANDOFF.md: bump current state to v0.1.2; mark the brands-PR task
obsolete (HACS uses the local brand mechanism on HA 2026.3+, and
home-assistant/brands auto-closes custom-integration PRs); note
v0.1.2 did not touch the cold-start setup freeze in task #3.
Co-authored-by: Cursor <cursoragent@cursor.com>
Captures the v0.1.2 coordinator optimizations: drop the redundant
10-minute timer, switch per-source-event refreshes to O(1)
async_set_updated_data, and gate the heartbeat publish on a Prediction
diff so idle systems stop fanning out no-op state writes.
Co-authored-by: Cursor <cursoragent@cursor.com>
A Home Assistant custom integration that turns every numeric percent
battery sensor into an actionable predicted-replacement-by datetime,
with auto-detection of replacements, lithium/alkaline chemistry
profiles, a confidence ladder, cold-start backfill from long-term
statistics, and a forward-prediction service. HACS-installable.
Implements the add-battery-lifetime OpenSpec change:
- 56/62 tasks done (10.2-10.7 are manual-validation gates)
- 18 spec requirements across 5 capabilities
- 107 unit tests passing under pytest-homeassistant-custom-component
Co-authored-by: Cursor <cursoragent@cursor.com>