Need algorithmic help

I’m just getting started with PLEG and I’m trying to figure out how to set up a specific scenario for presence sensors.

I have a Smartthings hub purely for the presence sensors it uses. With the help of forum member idefix, I was able to get the ST hub talking to Vera and I can now use the presence sensors to turn on/off virtual switches in Vera.

So far, I’ve set up a PLEG device that can turn off a lamp if all presence sensors are gone (all virtual switches are off). That part is easy to do.

What I can’t figure out how to do is to set up the PLEG to say “if ALL presence sensors are gone and at least ONE returns, turn that lamp back on.” Naturally, the lamp will be replaced by a “Going Out” scene, but for now I’m testing with a lamp.

All I know how to do is say “if one of the sensors comes back, turn the lamp on.” But that’s not good enough because I don’t want it to do that if there are other sensors already in the house.

How do I accomplish what I’m after? Sorry if this has been covered already…

You need a second condition whose expression is Not firstcondionname

Genius! Of course!

…how do I do that in the interface? I can’t tell how to do that…