Skip to content

Commit

Permalink
avoid duplicates in group_addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Dec 21, 2020
1 parent c24e0b0 commit 6413476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/xknx/__init__.py
Expand Up @@ -370,7 +370,7 @@ async def service_event_register_modify(self, call):
group_address = GroupAddress(call.data.get(SERVICE_XKNX_ATTR_ADDRESS))
if call.data.get(SERVICE_XKNX_ATTR_REMOVE):
self._knx_event_callback.group_addresses.remove(group_address)
else:
elif group_address not in self._knx_event_callback.group_addresses:
self._knx_event_callback.group_addresses.append(group_address)

async def service_send_to_knx_bus(self, call):
Expand Down

0 comments on commit 6413476

Please sign in to comment.