Buttons + Adaptive Lighting memory¶
SOMRIG bedside blueprint (bedrooms A/D/E; Bedroom C doorway is a bespoke
ESPHome-adapted twin):
- top single = on, bottom single = off
- top double = max-cool max-bright override
- bottom double = AL fully on + sleep TOGGLE + lights on
- holds = smooth dim via zigbee-native brightness_move on the room's Z2M
group topics (ESPHome rooms: stepped loop with mode:restart so release aborts)
AL override memory (the hard-won part):
- two input_booleans per room: al_restore (was AL on before?) and
al_override (sequence in progress). Snapshot happens ONLY on the first
override of a sequence — otherwise a dim-after-max chain clobbers the memory.
- lights-off ends the override and restores AL only if it was on before.
- after programmatically enabling AL you MUST adaptive_lighting.set_manual_control
manual_control: false (AL flags your own commands as manual and silently
stops adapting) and call adaptive_lighting.apply for immediacy — and AL's
flag listener is async, so clear it after a ~1s delay.
- AL configs are read at STARTUP: any entity rename in an AL lights list needs
an HA restart, not a reload.
- min_brightness ported as policy: 25% baseline, room exceptions (2/50/70).