Hi all,
I currently have a piston that changes my SHM status automatically each night and morning. This all works fine but it uses phone virtual presence sensors.
I’d like to add another layer to this. I created a virtual switch for each household member called "Vacation - ". Basically, if a household member has their Vacation switch set to ON, then we should ignore the fact that their presence sensor reads “not present”.
I figured I’d make a separate piston called “Everybody Home” that evaluates to true if all members of the household are home that are not marked as “Vacation: On”, and use that as a Global Variable in my other pistons.
I’m a programmer but am having trouble wrapping my head around the best approach to this logic besides a whole bunch of nested IF statements. Doing this for one member is simple but there may also be cases where more than one household members are not home.
Another approach might be to create separate pistons for each household member that evaluates to true if not present and vacation switch is on.
Has anyone done this sort of thing?