Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## 2.1.1

### Fixed

- ignore_off logic was inverted

## 2.1.0

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions custom_components/animated_scenes/animations.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def add_light(self, entity_id: str) -> None:
if state is None:
_LOGGER.warning("Entity %s not found, skipping", entity_id)
return
if entity_id not in self._active_lights and (state.state != "off" or not self._ignore_off):
if entity_id not in self._active_lights and (state.state != "off" or self._ignore_off):
self._active_lights.append(entity_id)

def add_lights(self, ids: list) -> None:
Expand Down Expand Up @@ -790,7 +790,7 @@ def pick_lights(self, change_amount: int) -> list[str]:
If `ignore_off` is enabled the method filters out lights that are
currently off when selecting a random subset.
"""
if self._ignore_off:
if not self._ignore_off:
to_change: list = []
randomized_list: list = sample(self._active_lights, k=change_amount)
for light in randomized_list:
Expand Down
Loading