mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
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 |
||
|---|---|---|
| .. | ||
| adaptive_lighting | ||