I managed to get a group switch to turn on/off in 1 action.
Group:Switch:OR(ON,OFF) Lights "Alle lichten"
This works perfectly for all normal switches.
But I also have a few dimmers in the same group. actually. How can I control these dimmers from a simple switch item?
And secondly, I only need the group switch to work as an “all off” switch. I don’t need the “all on” functionality.
Hello Tim
Nest your Groups:
Group AllLights
Group:Switch:OR(ON, OFF) LightSwitches (AllLights)
Group:Dimmer LightDimmer (AllLights)
rule AllLights received command off
when
Item AllLights received command off
then
LightSwitches.members.forEach[L | L.sendCommand(OFF)]
LightDimmer.members.forEach[D | D.sendCommand(0)]
end
The rule is written out of my mind, please refer the Documentation for the exact syntax.
1 Like
Thanks for the help. I changed it just a little bit.
rule "Lights"
when
Item Lights received command OFF
then
LightSwitches.members.forEach[L |
L.sendCommand(OFF)
Thread::sleep(200)
]
LightDimmer.members.forEach[D |
D.sendCommand(0)
Thread::sleep(200)
]
end
I added the Thread::Sleep because my dimmers acted a bit strange when I ran the rule.