Skip to content

Commit 5148993

Browse files
authored
Merge pull request #63 from Snuffy2/Fix-ignore_off-logic
Fix ignore_off logic
2 parents 1f620ce + aeed526 commit 5148993

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

custom_components/animated_scenes/animations.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,7 @@ def add_light(self, entity_id: str) -> None:
345345
if state is None:
346346
_LOGGER.warning("Entity %s not found, skipping", entity_id)
347347
return
348-
if (
349-
state.state != "off"
350-
and entity_id not in self._active_lights
351-
or (state.state == "off" and self._ignore_off and entity_id not in self._active_lights)
352-
):
348+
if entity_id not in self._active_lights and (state.state != "off" or not self._ignore_off):
353349
self._active_lights.append(entity_id)
354350

355351
def add_lights(self, ids: list) -> None:

0 commit comments

Comments
 (0)