Skip to content

Commit

Permalink
Merge pull request #449 from mguilherme/fix-light-color-issue
Browse files Browse the repository at this point in the history
Fix color issue with MDL110M
  • Loading branch information
albertogeniola authored Jan 27, 2024
2 parents 4e37c03 + fd93e54 commit 0f463f9
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 0f463f9

Please sign in to comment.