From 8a49a6fe87edd011766808b634b6213a5b92a0da Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Tue, 25 Aug 2020 18:41:58 +0200 Subject: [PATCH] use extend instead of += --- custom_components/circadian_lighting/switch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/circadian_lighting/switch.py b/custom_components/circadian_lighting/switch.py index 474e2ed1..01c1ad66 100644 --- a/custom_components/circadian_lighting/switch.py +++ b/custom_components/circadian_lighting/switch.py @@ -200,13 +200,13 @@ class CircadianSwitch(SwitchEntity, RestoreEntity): self._lights = [] if lights_ct is not None: - self._lights += lights_ct + self._lights.extend(lights_ct) if lights_rgb is not None: - self._lights += lights_rgb + self._lights.extend(lights_rgb) if lights_xy is not None: - self._lights += lights_xy + self._lights.extend(lights_xy) if lights_brightness is not None: - self._lights += lights_brightness + self._lights.extend(lights_brightness) """Register callbacks.""" dispatcher_connect(hass, CIRCADIAN_LIGHTING_UPDATE_TOPIC, self.update_switch)