Trying to get my brain around some logic. I have a Zooz motion detector looking for human presence. If 24 hours passes without it being trigger I would like the mode set to Away. When it actually detects someone I want the mode to be set to Home.
Remember, however, that motion sensors like the Zooz are susceptible to warm air currents, etc., so you may want to think about handling false motions. Maybe a second sensor?
mmW sensors are much better for home/away applications in my personal experience. The ones I've used can actually detect occupancy accurately, at all times. This of course depends on how you have them setup and if there are interference objects such as fans, etc.
But I will say that the ones I have in place that do not have interference sources and have been carefully posiitoned and adjusted are working better than any motion or purpose built occupancy sensor I've used previously.
Then add a conditional to the triggers. The rule would be:
Triggers: Motion (if mode is away) or Inactive and stays for 24 hours
Action: If motion, set mode to Home
Else, set mode to Away
End-If
Your rule would only run with Motion if mode is Away or the sensor goes inactive and stays that way for 24 hours. Motion would set the mode to Home. The Inactive trigger would set the mode to Away.
If you want to use the “two sensors activated” idea to reduce false “someone is home” events, this might work for you:
Trigger Event:
MotionA, MotionB all motion active
Actions:
Cancel Timed Actions: This Rule
Set TheMode to 'Home'
Wait for event: MotionA, MotionB all motion inactive
Set TheMode to 'Away'
-> delayed: 24:00:00
I'm sure you thought of this, but if you are gone and someone breaks into the house, by just using motion in the home, the mode will be set to "home". I would just be aware of this for anything related to door locks, garage doors, alarm system arming etc.
This is why I rely upon actual presence of the occupants of the home. If someone throws a brick through a window, I don't want to welcome them with unlocking the doors, turning on the lights and disabling the cameras.
Again, probably stating the obvious, but just in case.