From 8466e3c29c987db788750b6cc719068b19d5b441 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Tue, 13 Jan 2026 03:43:45 -0800 Subject: [PATCH] docs: clarify comment for light group turn_on check Update the comment at line 2832 to accurately reflect that this check handles light groups when context IDs don't match. The primary fix for #1378 (matching context IDs) is handled earlier in the context ID match block. --- custom_components/adaptive_lighting/switch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index eded357a..be716113 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2830,9 +2830,8 @@ class AdaptiveLightingManager: transition = None # Check if the off→on state change was triggered by a light.turn_on call. - # This check now also handles light groups: if a member light was turned on - # after the group turned off, the group's turn-on is considered valid. - # See: https://github.com/basnijholt/adaptive-lighting/issues/1378 + # For light groups, this also checks if a member's turn_on explains the + # group's turn-on (handles cases where context IDs don't match). if self._off_to_on_state_event_is_from_turn_on(entity_id, off_to_on_event): is_toggle = off_to_on_event == self.toggle_event.get(entity_id) from_service = "light.toggle" if is_toggle else "light.turn_on"