[SOLVED] Switching when a condition is NOT met

I have the following two switches in my sitemap

//All Home
Group:Switch:AND(ON,OFF)   gPresence            "gPresence"              <icon_presence>
//Someone is out
Group:Switch:AND(ON,OFF)    gPresenceIncomplete "gPresenceIncomplete"   <icon_presence>

I am trying to get the gPresenceIncomplete to show on when one of the group is off.

From a logic point of view I am trying to do the following

//Someone is out
Group:Switch:NOT(AND(ON,OFF))   gPresenceIncomplete            "gPresenceIncomplete"              <icon_presence>

From a syntax point of view I am not sure how to achieve this; basically I am wanting to invert the switch state (if that makes sense)

So, all of your presence Items are switches, they are all in the gPresenceIncomplete group, and you’d like this group’s state to be ON when any of the members are OFF and OFF when all are ON?

Group:Switch:NAND(ON,OFF)    gPresenceIncomplete "gPresenceIncomplete"   <icon_presence>

You’ll find a truth table for group logic in this post…

1 Like

Thanks for that and the tutorial link.