1) Give a description of the problem
I want to change the LocationMode to Away when both of these are true:
- All presence detectors are out of the house
- There has been no motion in the house for 30 minutes
I have 4 presence detectors and 4 motion sensors but may add more. My first instinct is to trigger on “all motion sensors see no motion for 30 minutes” and then check the state of presence detectors. Is there an efficient way to loop through all the Motion Sensors to avoid a giant if statement?
2) What is the expected behavior?
LocationMode changes to Away when:
- All presence detectors are out of the house
- There has been no motion in the house for 30 minutes
LocationMode changes to home when one of these happens:
- Someone arrives home (Presence Sensor)
- Motion from one of the sensors is active