Turn on lights when any of 4 people arrive AND they were gone at least 5 mins


#1

1) Give a description of the problem
I would like to have 2 lights come on after dark when any of 4 people come home, but only if they were gone at least 5 minutes. I am not sure how to script this.

2) What is the expected behavior?
see above

3) What is happening/not happening?
I am not sure how to have the piston check to see if the person who arrived was gone at least 5 mins.

**4)


#3

You will want to add a condition to your initial IF statement. You can basically duplicate your first condition but change it to “all of (the sensors) were not-present for at least 5 minutes”. This will ensure an empty house for at least 5 minutes. Alternatively, you could use a second condition of “$currentEventDevice was not present for at least 5 minutes” if you want the 5 minute restriction to only happen for the person that just got home.

The second option is probably the one you want if you want the lights to come on when people are home, but a new person returns home.


#4

Thank you, Brian - you are correct, the second option was what I was after, and that works beautifully!

Thank you again!