From 618234259d658e4165d25681eaf14131808391e2 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 5 Sep 2020 17:39:19 +0200 Subject: [PATCH] transition should always exist --- custom_components/circadian_lighting/switch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_components/circadian_lighting/switch.py b/custom_components/circadian_lighting/switch.py index 75e122fb..b77e04e4 100755 --- a/custom_components/circadian_lighting/switch.py +++ b/custom_components/circadian_lighting/switch.py @@ -352,11 +352,9 @@ class CircadianSwitch(SwitchEntity, RestoreEntity): if not is_on(self.hass, light): continue - service_data = {ATTR_ENTITY_ID: light} + service_data = {ATTR_ENTITY_ID: light, ATTR_TRANSITION: transition} if self._brightness is not None: service_data[ATTR_BRIGHTNESS] = int((self._brightness / 100) * 254) - if transition is not None: - service_data[ATTR_TRANSITION] = transition light_type = self._lights_types[light] if light_type == "ct":