adaptive-lighting/custom_components/adaptive_lighting
Joe Neuman b1729d906c Add restore_manual_control option to keep manual control across restarts
A restart currently clears manual control for every light: the startup
adaptation resets the flags and force-adapts, so a light that was dimmed by
hand before the restart comes back at the adaptive values. With the new
opt-in option, manual control is written to storage as it changes (debounced,
one store per Home Assistant instance) and restored at startup. The restored
flags are resolved once at EVENT_HOMEASSISTANT_STARTED: kept while the light
is on and at least one profile controlling it has the option without
autoreset_control_seconds, dropped otherwise, and forgotten when no profile
controls the light anymore, so the outcome does not depend on the order the
profiles are set up in. Only a full restart restores; a config-entry reload
still clears manual control. Unloading the last entry writes a pending save.
Defaults stay unchanged and nothing is read or written unless a profile opts in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EdXCHuaz4Yj932oEwtgouW
2026-09-08 18:00:23 -07:00
..
translations Add restore_manual_control option to keep manual control across restarts 2026-09-08 18:00:23 -07:00
__init__.py Add restore_manual_control option to keep manual control across restarts 2026-09-08 18:00:23 -07:00
_docs_helpers.py Register service actions in async_setup for Bronze tier compliance (#1403) 2026-09-06 13:04:18 +02:00
adaptation_utils.py Fix missing follow-up commands during multi-light interception (#1560) 2026-09-06 14:03:08 +02:00
color_and_brightness.py fix: keep adapting during polar night and midnight sun (#1489) 2026-09-06 00:23:21 -07:00
config_flow.py Implement collapsible sections for options flow (#1313) 2026-09-06 17:18:42 +02:00
const.py Add restore_manual_control option to keep manual control across restarts 2026-09-08 18:00:23 -07:00
diagnostics.py Add on-demand Home Assistant diagnostics (#1575) 2026-09-06 19:11:55 +02: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 fix: track mixed targets during light turn-off (#1584) 2026-09-07 07:41:28 +02:00
helpers.py Friendly names (#1258) 2025-11-27 12:01:05 -08:00
manifest.json chore: release v1.32.0 (#1580) 2026-09-06 22:06:43 +02:00
services.yaml feat: add expand_light_groups option (#1462) 2026-09-06 21:13:35 +02:00
strings.json Add restore_manual_control option to keep manual control across restarts 2026-09-08 18:00:23 -07:00
switch.py Add restore_manual_control option to keep manual control across restarts 2026-09-08 18:00:23 -07:00