From 72f79a5f2fa1ee99168ee716d32a90453b500209 Mon Sep 17 00:00:00 2001 From: Sanjoy Ghosh Date: Sat, 24 Feb 2024 01:11:37 +0530 Subject: [PATCH] Another bug fix --- custom_components/dirigera_platform/light.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/dirigera_platform/light.py b/custom_components/dirigera_platform/light.py index 4cb8081..383b245 100644 --- a/custom_components/dirigera_platform/light.py +++ b/custom_components/dirigera_platform/light.py @@ -114,7 +114,7 @@ def color_temp_kelvin(self): @property def hs_color(self): - return (self._json_data.attributes.color_hue, self._json_data.attributes.color_saturation) + return (self._json_data.attributes.color_hue, self._json_data.attributes.color_saturation*100) @property def is_on(self): @@ -160,9 +160,9 @@ def turn_on(self, **kwargs): logger.debug("Request to set color HS") hs_tuple = kwargs[ATTR_HS_COLOR] self._color_hue = hs_tuple[0] - self._color_saturation = hs_tuple[1] + self._color_saturation = hs_tuple[1]/100 # Saturation is 0 - 1 at IKEA - self._json_data.set_light_color(self._color_hue, self._color_saturation/100) + self._json_data.set_light_color(self._color_hue, self._color_saturation) except Exception as ex: logger.error("error encountered turning on : {}".format(self.name))