Hi,
- I have an item ‘node31_out1’ which is a SwitchItem, and I declared following MQTT bindings:
[mysensor:cmdMQTT/31/1/V_LIGHT:command:ON:2],
[mysensor:cmdMQTT/31/1/V_LIGHT:command:OFF:3],
[mysensor:cmdMQTT/31/1/V_LIGHT:command:TOGGLE:4],
[mysensor:cmdMQTT/31/1/V_LIGHT:command:BLINK:5]
- In my sitemap I have declared a Switch linked to ‘node31_out1’, it has an icon ‘Light’ and following mappings: ON=On, OFF=Off, TOGGLE=Toggle, BLINK=Blink
This results in 4 buttons in the GUI.
- Logic dictates me that pressing the ON button sends an ‘ON’ command to node31_out1, which in turn finds its binding and sends cmdMQTT/31/1/V_LIGHT=2
Similar for OFF, TOGGLE and BLINK.
But obviously OH does not work logical which causes a lot of frustration. Seems like the TOGGLE button in itself sends the ON and OFF commands alternatively to node31_out1. And the BLINK command is unhandled with a warning (see topic title).
How can we provide on 1 line, an icon to represent an output state, and multiple buttons to perform predefined commands like ON, OFF, TOGGLE, BLINK ???
thx