New Rule - Presence Devices

I am trying to create a rule that triggers if anyone of four people arrives between 1130 pm and sunrise the next day (these are presence devices thru Life360 in the new SmartThings app). Then, I want two lights turned on for ten minutes. Can I do this in the Rule engine? I’ve attempted this. I think I can trigger if one of four people arrive between 1130 and a time the next morning, but not sunrise. Also, I can turn on lights, but can’t figure out how to turn them off ten minutes later. Maybe a separate rule? Thoughts? Thanks.

Hi @Richard_Belthoff, see below for example and make sure you change the IF_Condition logic from all(AND) to any (OR). (After 11:30pm or before sunrise). You can select sunrise/sunset at top-left corner when selecting the time in the IF_Condition, and use Delay action to turn off the light 10 minutes later.

image

Fantastic. Thanks. I’ll try it tomorrow (phone’s harder to use to program :laughing:).

I didn’t realize (remember? realize?) that If can be changed to Any rather than All. Thanks.

And I surely missed Sunrise on the time clock dialog. Duh. :stuck_out_tongue_winking_eye:

Question, though. Why is it after 1130 OR before Sunrise and not AND? Thanks.

Because it is considered as the new day after 00:00AM, so if the condition is AFTER 11:30PM that means “11:30PM - 11:59:59PM”, and BEFORE sunrise means “00:00AM - Sunrise”. So it is impossible for a time to be in both windows (AND), but it can be in either one (OR).

1 Like