Shelly RGBW2 - HSB command doesn’t work

Hi guy´s, I am not complete new on the Openhab but for sure not an expert and this is my first pot here. So excuse me when Iam not so familar here but I really ask you for your help on the following issue:

There are some simple lines of code to send a color request to an Shelly RGBW2.

Coming from the following initial situation:

  • openHAB 2.5.0 installed on Raspberry pi
  • Installed – Shelly RGBW2 Firmware -20201124-092159/v1.9.0@57ac4ad8
  • Color before request à something different as the request below
  • If Item Virtual_Switch_1 changed from OFF to ON à
  • Requested full blue hue (240)/sat (100)/bright (100)


  • If line 13 ios active and 14 deactivated , everything is fine and LED stripe becomes blue.
  • If line 14 is active and 13 deactivated , nothing happening and the initial colors doesn’t change, even though VS Code does not show an syntax error.

Now I am suffering and asking for your help:
Why is b) not working? Hope on your ideas.

Thanks in advanced.

> var DecimalType hue = new DecimalType(240) // 0-360;
> var PercentType sat = new PercentType(100) // 0-100
> var PercentType bright = new PercentType(100) // 0-100
> var HSBType newB = new HSBType(hue, sat, bright)
> rule “FarbLicht”
> when Item Virtual_Switch_1 changed from OFF to ON
> then
> //ShellyLichtSauna1012312369ColorHsb.sendCommand(‘240, 100, 100’) // Line 13 WORKING line
> ShellyLichtSauna1012312369ColorHsb.sendCommand(newB.toString) // Line 14 NOTworking line
> end