diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 85619460..afeb7fa7 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2694,7 +2694,10 @@ def _off_to_on_state_event_is_from_turn_on( off_to_on_event: Event, ) -> bool: # Adaptive Lighting should never turn on lights itself - if is_our_context(off_to_on_event.context): + if is_our_context(off_to_on_event.context) and not is_our_context( + off_to_on_event.context, + "service", # adaptive_lighting.apply is allowed to turn on lights + ): _LOGGER.warning( "Detected an 'off' → 'on' event for '%s' with context.id='%s' and" " event='%s', triggered by the adaptive_lighting integration itself,"