Skip to content

Commit

Permalink
Another bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
c503ghosh committed Feb 23, 2024
1 parent 9cc2f25 commit 72f79a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/dirigera_platform/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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))
Expand Down

1 comment on commit 72f79a5

@nausicaaconsulting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, it just fixed an issue I was writing XD.
Kind regards

Please sign in to comment.