Skip to content

Commit

Permalink
Fix color issue with MDL110M
Browse files Browse the repository at this point in the history
  • Loading branch information
mguilherme committed Jun 14, 2023
1 parent c8854bf commit fd93e54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/meross_cloud/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fd93e54

Please sign in to comment.