diff --git a/custom_components/meross_cloud/light.py b/custom_components/meross_cloud/light.py index 0996cf1cce..c9cb696839 100644 --- a/custom_components/meross_cloud/light.py +++ b/custom_components/meross_cloud/light.py @@ -95,10 +95,11 @@ def brightness(self): @property def hs_color(self): - if self._device.get_supports_rgb(channel=self._channel_id): - rgb = self._device.get_rgb_color() + rgb = self._device.get_rgb_color(channel=self._channel_id) + if rgb is not None and isinstance(rgb, tuple) and len(rgb) == 3: return color_util.color_RGB_to_hs(*rgb) - return None + else: + return None # Return None if RGB value is not available @property def color_temp(self):