adaptive-lighting/custom_components/adaptive_lighting
Dennis Dekker c620d1480a
fix: re-adapt lights right after the auto-reset timer fires (#1506)
When the auto-reset timer fired, its callback called manager.reset(),
which pops the timer and calls timer.cancel() - cancelling the very task
that was running the callback. The manual_control flag was cleared, but
the re-adaptation that should follow was silently cancelled, so the light
only changed on the next interval pass (with the normal transition).

_AsyncSingleShotTimer.cancel() now never cancels the task that is
currently running its own callback. The trailing assert in the callback
is removed because it is reachable now and could trip when a new manual
change comes in while the re-adaptation is still running. The existing
auto-reset test also checks that a light.turn_on with the 'autoreset'
context is sent.

Fixes #1233

Co-authored-by: Dennis-Dekker <>
Co-authored-by: Bas Nijholt <bas@nijho.lt>
2026-09-06 07:01:50 +00:00
..
translations fix: restore hassfest and Home Assistant CI 2026-04-24 11:31:53 -07:00
__init__.py Code cleanup (#1348) 2025-12-12 13:37:42 -08:00
_docs_helpers.py Individual manual control of brightness and color (#1356) 2025-12-22 22:55:16 -08:00
adaptation_utils.py fix: use quantization-aware comparison in skip_redundant_commands filter (#1513) 2026-09-06 06:53:06 +00:00
color_and_brightness.py fix: replace deprecated get_astral_location with get_astral_observer (#1482) 2026-07-01 23:00:35 -07:00
config_flow.py fix: restore hassfest and Home Assistant CI 2026-04-24 11:31:53 -07:00
const.py Fix regression: lights not adapting when turned on by automation (#1380) 2026-01-12 13:40:55 +01:00
docs_gen.py Migrate to markdown-code-runner's built-in include_section() (#1417) 2026-01-26 09:01:50 +01:00
hass_utils.py Friendly names (#1258) 2025-11-27 12:01:05 -08:00
helpers.py Friendly names (#1258) 2025-11-27 12:01:05 -08:00
manifest.json Update manifest.json to v1.31.0 (#1486) 2026-07-07 09:38:26 -07:00
services.yaml Individual manual control of brightness and color (#1356) 2025-12-22 22:55:16 -08:00
strings.json fix: restore hassfest and Home Assistant CI 2026-04-24 11:31:53 -07:00
switch.py fix: re-adapt lights right after the auto-reset timer fires (#1506) 2026-09-06 07:01:50 +00:00