mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-27 04:14:47 +02:00
The context ID match check at line 2804 was returning True (blocking adaptation) before checking if a member light's turn_on event explained the group's turn-on. This caused the issue where light groups wouldn't adapt when a member was turned on by automation. The fix adds a check for _member_turn_on_explains_group_turn_on() inside the context ID match block. If a member's turn_on event happened after the group's on→off event, the group's turn-on is legitimate and not a polling artifact, so we return False (allow adaptation). This is a more targeted fix than reordering the checks, which broke test_separate_turn_on_commands. By keeping the context ID check first but adding the member check inside it, we: 1. Preserve the original polling artifact detection for non-groups 2. Properly handle light groups where HA reuses context IDs Fixes: #1378 |
||
|---|---|---|
| .. | ||
| translations | ||
| __init__.py | ||
| _docs_helpers.py | ||
| adaptation_utils.py | ||
| color_and_brightness.py | ||
| config_flow.py | ||
| const.py | ||
| docs_gen.py | ||
| hass_utils.py | ||
| helpers.py | ||
| manifest.json | ||
| services.yaml | ||
| strings.json | ||
| switch.py | ||