Skip to content
Snippets Groups Projects
Commit 04cee96e authored by jkerdreu's avatar jkerdreu
Browse files

Second try

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2963 b32b6428-25c9-4566-ad07-03861ab6144f
parent 8ee9eb03
No related branches found
No related tags found
No related merge requests found
......@@ -419,8 +419,10 @@ class Gateway(AqaraDev):
hsv = _hsv
h,s,v = hsv
rgb=tuple(round(i * 255) for i in colorsys.hsv_to_rgb(h/360.0,s,v))
brightness = self.devices[0].attributes['brightness']
brightness = int(brightness * 0xff / 100)
if self.rgb:
brightness = self.value_to_rgb(self.rgb)[3]
else:
brightness = 0xFF
value= self.rgb_to_value(*rgb,brightness)
self.lamp_set(value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment