We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1f620ce + aeed526 commit 5148993Copy full SHA for 5148993
custom_components/animated_scenes/animations.py
@@ -345,11 +345,7 @@ def add_light(self, entity_id: str) -> None:
345
if state is None:
346
_LOGGER.warning("Entity %s not found, skipping", entity_id)
347
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
- ):
+ if entity_id not in self._active_lights and (state.state != "off" or not self._ignore_off):
353
self._active_lights.append(entity_id)
354
355
def add_lights(self, ids: list) -> None:
0 commit comments