- Platform information:
- Hardware: Raspberry Pi Model B Rev 2
- OS: Openhabian
- Java Runtime Environment: which java platform is used and what version
- openHAB version: openHAB 2.5.7-1 (Release Build)
Right now, I have a Switch to control a group of MQTT-controlled tasmota smart sockets, connected to lights. When toggling this switch, all four of these lights will be toggled one by one.
I much prefer the MQTT ‘group topic’ behaviour: if I send cmnd/sfeerlampen/POWER toggle
, all lights will be toggled at once.
Is there a way to override a group switch’s action yet still keep the nice ‘OR(ON,OFF)’ behaviour of the switch and icons? In other words, I want to have openhab emit cmnd/sfeerlampen/POWER toggle
when hitting the switch but I also want it to keep showing the ‘calculated group state’.
items.conf:
Group:Switch:OR(ON,OFF) sfeerlampen "Sfeerlampen"
Switch woonkamerlamp_muur "Woonkamerlamp muur" (sfeerlampen) { channel="mqtt:topic:apparaten:woonkamerlamp_muur", ga="Light", autoupdate="false" }
Switch woonkamerlamp_kast "Woonkamerlamp muur" (sfeerlampen) { channel="mqtt:topic:apparaten:woonkamerlamp_kast", ga="Light", autoupdate="false" }
Switch marokkaanse_lamp_klein "Marokkaanse lamp klein" (sfeerlampen) { channel="mqtt:topic:apparaten:marokkaanse_lamp_klein", ga="Light", synonyms="kleine marokkaanse lamp", autoupdate="false"}
Switch marokkaanse_lamp_groot "Marokkaanse lamp groot" (sfeerlampen) { channel="mqtt:topic:apparaten:marokkaanse_lamp_groot", ga="Light", synonyms="grote marokkaanse lamp", autoupdate="false"}
sitemap.conf:
Switch item=sfeerlampen label="Sfeerlampen [MAP(switch.map):%s]" icon="light"
Switch item=woonkamerlamp_muur label="Woonkamerlamp muur [MAP(switch.map):%s]" icon="light"
Switch item=woonkamerlamp_kast label="Woonkamerlamp kast [MAP(switch.map):%s]" icon="light"
Switch item=marokkaanse_lamp_klein label="Marokkaanse lamp klein [MAP(switch.map):%s]" icon="light"
Switch item=marokkaanse_lamp_groot label="Marokkaanse lamp groot [MAP(switch.map):%s]" icon="light"