Skip to content
Merged
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
5 changes: 4 additions & 1 deletion homeassistant/components/deconz/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ async def options_updated(self) -> None:

entity_registry = er.async_get(self.hass)

for entity_id, deconz_id in self.deconz_ids.items():
# Copy the ids since calling async_remove will modify the dict
# and will cause a runtime error because the dict size changes
# during iteration
for entity_id, deconz_id in self.deconz_ids.copy().items():
if deconz_id in deconz_ids and entity_registry.async_is_registered(
entity_id
):
Expand Down