mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-17 09:14:04 +02:00
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.
This commit is contained in:
parent
f7c8e0dcca
commit
8466e3c29c
1 changed files with 2 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue