HSBType brightness ON/OFF problem with brightness

OH v2. PRI3.


Color RGBLedKorr "Korridor"


rule "Set HSB value of item RGBLed to RGB color value"

	Item RGBLedKorr changed
	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)

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”


  1. Why brightness sets in 100%?
  2. Why another values changing? But this point not very important

I think you log to different Value’s …
By Clicking ON you log RGB…
By Clicking OFF the HUE SAT BRI logged …

Can someone help me to find the answer and thesolution?
I doubt that everyone likes the fact that the value of color varies by itself on 255,255,255

This are Color (RGB) Values …

HSB Values is HUE SAT BRI not R G B

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.

I still have this problem. How to solve?