Closed valexi7 closed 4 years ago
Hi,
I fixed your code. Can you upload this to GitHub? Now you can set both, brightness and color at the same time. Still working on with the transitions...
if ATTR_HS_COLOR in kwargs:
self._hs = kwargs[ATTR_HS_COLOR]
convertedHue = int(self._hs[0]*(255/360))
convertedSaturation = int(self._hs[1]*(255/100))
if ATTR_BRIGHTNESS in kwargs:
convertedBrightness = kwargs[ATTR_BRIGHTNESS]
else:
convertedBrightness = self._brightness
self._postReq('ambilight/currentconfiguration',{"styleName":"FOLLOW_COLOR","isExpert":True,"algorithm":"MANUAL_HUE",
"colorSettings":{"color":{"hue":convertedHue,"saturation":convertedSaturation,"brightness":convertedBrightness},
"colorDelta":{"hue":0,"saturation":0,"brightness":0},"speed":255}} )
Hi, sorry I haven't been very active recently, I have been very busy, but thank you! that always bugged me! - Could you please make a pull request to make sure that goes in the right place, I can merge it in straight away.
I'm trying to do this:
But you can only set brightness or rgb_color in the same action.
Could you modify your code that if you are trying to set brightness and color to light component it would split them to two requests?