File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
custom_components/adaptive_lighting Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 88 "iot_class" : " calculated" ,
99 "issue_tracker" : " https://github.com/basnijholt/adaptive-lighting/issues" ,
1010 "requirements" : [" ulid-transform" ],
11- "version" : " 1.18.1 "
11+ "version" : " 1.18.2 "
1212}
Original file line number Diff line number Diff line change @@ -2476,7 +2476,16 @@ def _off_to_on_state_event_is_from_turn_on(
24762476 off_to_on_event : Event ,
24772477 ) -> bool :
24782478 # Adaptive Lighting should never turn on lights itself
2479- assert not is_our_context (off_to_on_event .context )
2479+ if is_our_context (off_to_on_event .context ):
2480+ _LOGGER .warning (
2481+ "Detected an 'off' → 'on' event for '%s' with context.id='%s' and"
2482+ " event='%s', triggered by the adaptive_lighting integration itself,"
2483+ " which *should* not happen. If you see this please submit an issue with"
2484+ " your full logs at https://github.com/basnijholt/adaptive-lighting" ,
2485+ entity_id ,
2486+ off_to_on_event .context .id ,
2487+ off_to_on_event ,
2488+ )
24802489 turn_on_event : Event | None = self .turn_on_event .get (entity_id )
24812490 id_off_to_on = off_to_on_event .context .id
24822491 return (
You can’t perform that action at this time.
0 commit comments