[Solved] HM-OU-LED16 - Status Display - How to set the different LED states (off, green, red, orange)?

Hello,

I just purchased the Status Display HM-OU-LED16 and try to find out how to set the LEDs through a rule. Current setup is:

item file:
Switch HomematicLed16_B "HomeMatic led" (gStatus) {homematic="address=KEQxxxxxxx, channel=1, parameter=LED_STATUS"}

My rule looks like:
rule "Statusanzeige" when Item partySwitch changed to ON //Just for testpurposes, as this switch exists already in the sitemap then sendCommand(HomematicLed16_B, ON) //This is working, but both status LEDs are turned on and display "orange", so how to get either "green" or "red"? end
Log file shows the following error message, when I change the sendCommand to one of the following:
sendCommand(HomematicLed16_B, "GREEN") or sendCommand(HomematicLed16_B, GREEN) or sendCommand(HomematicLed16_B, 2) // 2 = Green according to the description sendCommand(HomematicLed16_B, '2') sendCommand(HomematicLed16_B, "2")

error Message:
given command is NULL, couldn't send command to 'HomematicLed16_B'

Thanks for your help.

Found the solution. Instead of using a Switch I had to use a Number. So the item file entry looks like:

Number HM_LED16_16 “HomeMatic led %s” (gStatus) {homematic=“address=KEQxxxxxxx, channel=16, parameter=LED_STATUS”}

The entry above will adjust the last status LED of the screen.

Then you are able to use it as expected in rules:

rule “Statusanzeige”
when
Item partySwitch changed to ON
then
HM_LED16_16.sendCommand(2)
end