State lamp ON/OFF not OPEN/CLOSE


  • Platform information:
    • Hardware: RPI 4
    • OS: openhabian
    • openHAB version: 3
  • Issue of the topic:

I would like to have a status feedback from my lamps. For that I use the contact function. But I have as Open or Close information. Is it possible instead to have ON and OFF?

Best regards

You could use meta data (state descriptions) to change it, but this will only be visual.
Otherwise transformation map could do it on the incoming signal.

Typically a lamp is not combined with a contact. Typically it is connected to s witch and the switch habe ON/OFF

With a little bit more of information we could help better. How is your lamp item configured? Where do you like to show that status BasicUI?


I want to show that status on openhab
The lamp is configure with KNX device and I use the switch function on openhab. But with the switch I don’t have the because I have 1 group adress for the switch and on another group adress for the state

How can I change this data ?

Maybe you should show us the detail of that.

Why? This is conceptual misunderstanding. Just use the status of the existing switch type item and you should be fine.
You can also configure a switch type item to more than one channel (= KNX GA) so you can specify to send commands to GA 1 but receive (and propagate into OH) the state from GA 2.

You can even configure another (second !) ‘switch’ type item for the ‘state’ address as, which by default will display as ON/OFF, but again you have a misconception here.