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 16, 2020
1 parent 92d70f5 commit 697bf4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion home-assistant-plugin/custom_components/xknx/__init__.py
Original file line number Diff line number Diff line change
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 697bf4f

Please sign in to comment.