From b7245ec219860d6338d1deaba40f55fb47fcca7b Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 12 Sep 2020 12:55:29 +0200 Subject: [PATCH] no need to cast to a different type --- custom_components/circadian_lighting/switch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/circadian_lighting/switch.py b/custom_components/circadian_lighting/switch.py index 9233ea86..d4647393 100755 --- a/custom_components/circadian_lighting/switch.py +++ b/custom_components/circadian_lighting/switch.py @@ -534,10 +534,9 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): light_type = self._lights_types[light] if light_type == "mired": - service_data[ATTR_COLOR_TEMP] = int(self._colortemp_mired) + service_data[ATTR_COLOR_TEMP] = self._colortemp_mired elif light_type == "rgb": - r, g, b = self._rgb_color - service_data[ATTR_RGB_COLOR] = (int(r), int(g), int(b)) + service_data[ATTR_RGB_COLOR] = self._rgb_color elif light_type == "xy": service_data[ATTR_XY_COLOR] = self._xy_color if service_data.get(ATTR_BRIGHTNESS, False):