Motion notification overnight

I’d like to set up a rule that will send a “Critical Alert” to my iPhone if motion is detected by one sensor between 10:45 PM and 6:45 AM, with both of us are home. I tried this and it didn’t work when I tested it. Any suggestions would be greatly appreciated!

I think the issue is your time conditions. You think the am check is the next day but it’s not … it’s the current day. So, those two conditions are never met.

I could be wrong. I often get tripped up on time-based conditions.

1 Like

Sounds right to me. As it’s currently configured, the condition would never evaluate to true as the time can’t be both before 6:45 AM and after 10:45 PM.

Instead, you would want to use a single time condition with between 10:45 PM and 6:45 AM and you’ll notice that it shows the second time as +1 day indicating it’s an overnight condition.

The following post visualizes the concept applied to separate Sunrise and Sunset conditions and why you would need to use an OR condition in that case. But since you’re using specific times, using a single between times condition is even better/simpler.

1 Like

Thanks guys, I’ve created one time as suggested for the time range. I’m going to test it by setting the first time to current instead of 10:45. My expectation is that it should not trigger a notification since my wife is not currently home.

I’m still not configured correctly. My test didn’t produce expected results. With my wife away, I still received a notification when the motion sensor saw motion. Any thoughts on why this happened? Thanks.

Have you checked the Rule Logs to see what they say?

And it’s hard to say without seeing what the reconfigured rule looks like.

Hi Josh, I’m getting back to this today. The time range is working, still trying to find a way to include our presence status into the rule successfully. Thanks for you input.

I would pay close attention to the IF Condition configuration. Using the Current Time is Between
along with AND conditions for the presence should work.

Trigger:
Great Room Sensor - motion updates and is ‘active’

Flow
IF Current Time is Between '10:45PM' and '6:45AM'
  AND Bruce iPhone - presence is 'present'
  AND Kelly iPhone - presence is 'present'
THEN
  Send Notification

If it doesn’t work as expected, I would review the Rule Logs closely as it will help you understand what the state was of the evaluated conditions so you can better understand what’s going on (eg. it’s possible a device is reporting the wrong state or something unexpected).