Skip to content

Commit

Permalink
fix list
Browse files Browse the repository at this point in the history
  • Loading branch information
kongo09 committed Jan 10, 2022
1 parent 90a1a9e commit 8e55adc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/hhs_vertretungsplan/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def extra_state_attributes(self) -> Dict[str, Any]:
]
vertretungen = self.coordinator.data[ATTR_VERTRETUNG]
_LOGGER.debug(f"before adding: len(vertretung_state) = {len(vertretung_state)}")
vertretung_state = [vertretungen[x] for x in selection if x in vertretungen.keys()]

for select in selection:
if select in vertretungen.keys():
vertretung_state.extend(vertretungen[select].copy())
_LOGGER.debug(f"after adding: len(vertretung_state) = {len(vertretung_state)}")

return {
Expand Down

0 comments on commit 8e55adc

Please sign in to comment.