Fix: Scene "None" restores previous color instead of black (#18)
Bug: Selecting "None" in the scene dropdown set the light to black instead of restoring the previous color.
Root cause:
last_color/last_color_temp_kelvinwere lost during API poll cycles —_fetch_device_state()didn't preserve them from existing stateasync_clear_scene()fell back toNoneinstead oflast_colorwhen rejectingRGBColor(0,0,0)returned by the API during scenes
Fix:
- Preserve
last_color,last_color_temp_kelvin,last_scene_id,last_scene_nameacross API polls as "memory" fields (unconditional, no power-state gating) - Fall back to
state.last_colorinstead ofNonewhen rejecting black in scene clear - Added 4 new tests covering preservation and end-to-end flow