I have a group where I linked all my lights and I can use it to power OFF all the lights. BUT when I use it, a lot of non necessary logs and command are sent to the bus. So I’d like to design a pattern where only the powered ON lights will receive the power OFF command.
my idea is a group of lights on .items file:
Group:Switch:OR(ON, OFF) gLight "all the light" Switch Luce_Bagnetto "Light1" <light> (gLight) Switch Luce_Bagnetto "Light2" <light> (gLight)
//rule that switch OFF only powered on lights when Item away received command ON than gLight.members.filter[ i | i.state == ON] //here I miss an easy way to sendCommand OFF end
maybe someone know a more intelligent way to address this problem.