rule "Set HSB value of item RGBLed to RGB color value"
when
Item RGBLedKorr changed
then
val hsbValue = RGBLedKorr.state as HSBType
val redValue2 = hsbValue.red.intValue.toString
val greenValue2 = hsbValue.green.intValue.toString
val blueValue2 = hsbValue.blue.intValue.toString
logInfo("FILE", redValue2 + " " + greenValue2 + " " + blueValue2)
end
In colorpicker in GUI on web page or android app I set color value “25 0 1”
If I click on “OFF” button - OH write "0 0 0"
If I click on “ON” button - OH write “100 3 6”
Why?
Why brightness sets in 100%?
Why another values changing? But this point not very important
And how should I act? What should I do?
I want that brightness to be restored to the specified value.
I change RGB value trought the colorpicker. I push OFF button, then push ON button. And brightness dont restore
I have my proxy ColorOn and ColorOff items, Then use lots of proxies so that when you turn a light on it gently switches to ColorOn, and similar when turning off. I’m sure there is a more elegant way but probably utilizing the difference between command and update to get rids of a few proxies and maybe something on the persistent side to properly utilise the state history to restore the state to.