Part of #670
Summary
Replace global quick/debounce refresh state with entry-specific tracking that feeds
the manager refresh pipeline. Rapid edits should coalesce per lock, while edits on different locks
refresh independently. This completes the releasable unit started by task-9.
Scope / changes
- Replace global
_quick_refresh and _cancel_quick_refresh at coordinator.py:118-119, plus
shutdown cleanup at coordinator.py:139-145, with per-entry sets/maps.
- Convert
_trigger_quick_refresh() and debounce methods at coordinator.py:1834-1857 to accept
entry IDs and call the manager pipeline/per-lock coordinator refresh.
- Convert all
_quick_refresh = True sites to record entry IDs: coordinator.py:1596,
coordinator.py:1678, coordinator.py:2310, and parent-child retry at
coordinator.py:2493.
- Convert
_schedule_quick_refresh_if_needed() at coordinator.py:2511-2522 to schedule only
pending entry IDs.
- Keep entity setters calling
await self.coordinator.async_request_debounced_refresh() through
per-lock coordinator proxies; current setter examples include switch.py:324 and
switch.py:352.
- Extend
tests/test_debounce.py, which currently mocks _quick_refresh at
tests/test_debounce.py:53-63, for per-entry quick/debounce behavior.
Plan reference
§5.7, §7.2, §7.5, §8 PR 5; decisions 3 and 9;
2026-07-07 task-9/task-10 shippability finding.
Dependencies
Depends on: #683
Acceptance criteria
Risk / notes
Avoid reintroducing independent simultaneous polling. All scheduled quick
refreshes should pass through the manager's single sequential refresh loop from task-8.
Size
M
Part of #670
Summary
Replace global quick/debounce refresh state with entry-specific tracking that feeds
the manager refresh pipeline. Rapid edits should coalesce per lock, while edits on different locks
refresh independently. This completes the releasable unit started by
task-9.Scope / changes
_quick_refreshand_cancel_quick_refreshatcoordinator.py:118-119, plusshutdown cleanup at
coordinator.py:139-145, with per-entry sets/maps._trigger_quick_refresh()and debounce methods atcoordinator.py:1834-1857to acceptentry IDs and call the manager pipeline/per-lock coordinator refresh.
_quick_refresh = Truesites to record entry IDs:coordinator.py:1596,coordinator.py:1678,coordinator.py:2310, and parent-child retry atcoordinator.py:2493._schedule_quick_refresh_if_needed()atcoordinator.py:2511-2522to schedule onlypending entry IDs.
await self.coordinator.async_request_debounced_refresh()throughper-lock coordinator proxies; current setter examples include
switch.py:324andswitch.py:352.tests/test_debounce.py, which currently mocks_quick_refreshattests/test_debounce.py:53-63, for per-entry quick/debounce behavior.Plan reference
§5.7, §7.2, §7.5, §8 PR 5; decisions 3 and 9;
2026-07-07 task-9/task-10 shippability finding.
Dependencies
Depends on: #683
Acceptance criteria
set_pin_on_lock()andclear_pin_from_lock()add only target/transaction-affected entry IDsto quick-refresh tracking.
deferred and scoped to the dirty entry set.
pytest tests/test_debounce.py tests/test_coordinator_sync.py.ruff check custom_components/ tests/,ruff format --check custom_components/ tests/,mypy custom_components/keymaster/.Risk / notes
Avoid reintroducing independent simultaneous polling. All scheduled quick
refreshes should pass through the manager's single sequential refresh loop from
task-8.Size
M