Rules for latching relays group

Don’t know what that means, cannot see what you are doing.

I thought you wanted to control members of group like GF_Dining ?
Why would you not use GF_Dining?.members.filter[...

GF_Dining is only a room, i would fiter all lights on floor GF , i tried with GF?.members.filter , but members are only the rooms.

image

Ah right, nested groups.
GF?.allMembers.filter...
will reach through the layers.

I solved simple with string compare

rule "GF lights off"
when
    Item GF_lights_off received command ON
then
    logInfo("GF lights off","Rule started.")
    gLight?.members.filter[a|a.state==OPEN].forEach[s|
        logInfo("GF_pulse","Processing Item {} ({})",s.name,s.state)
		var nameOfLight = s.name.split("_")
		var nameofPulse = nameOfLight.get(0) + "_" + nameOfLight.get(1) + "_Pulse"
		            if ( nameOfLight.get(0) == "GF") {
		           sendCommand(nameofPulse, "OFF") } else {}

        Thread::sleep(300) 
    ]
    logInfo("GF lights off","Rule ends.")
	sendCommand(GF_lights_off, OFF)
end