I’m new to writing rules this way but you can test this to see if it works.
rule "Etenstijd"
when
Item Scene_Eten received command ON
then
logInfo("Scene Etenstijd gestart", "bjorn en lili licht aan bij starten van de scene")
Officebjornlicht.sendCommand(if(Officebjornlicht.state == ON) ON else OFF)
Officelililicht.sendCommand(if(Officelililicht.state == ON) ON else OFF)
Scene_Eten.postUpdate(OFF)
end
The rule should change the light to it’s opposite state every time Scene_Eten receives command ON.
EDIT: Now the rule has been tested and works, credit goes to @rlkoshak for showing me how to use edge cases. Thanks Rich