From 641347610ccce409899a6401b121f147673718fd Mon Sep 17 00:00:00 2001 From: farmio Date: Wed, 16 Dec 2020 15:13:58 +0100 Subject: [PATCH] avoid duplicates in group_addresses --- home-assistant-plugin/custom_components/xknx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-assistant-plugin/custom_components/xknx/__init__.py b/home-assistant-plugin/custom_components/xknx/__init__.py index 4831861a3c..3c0952a08d 100644 --- a/home-assistant-plugin/custom_components/xknx/__init__.py +++ b/home-assistant-plugin/custom_components/xknx/__init__.py @@ -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):