I have an automation I need a little bit of help with. Essentially, I’m trying to trigger it when motion is detected at my front door. However I only want to continue the automation if a person is detected as well. I tried doing a wait for trigger of person detected true, but that doesn’t fire if the last state was already true.
How can I make an automation that checks if something is true, and if not, it waits until it is true?
Automation works as is, but the attribute is from the last motion event. So if the last one was a person and motion triggers again the attribute won’t change, that’s why I need it to trigger on motion and persondetected true. I could do a delay, and then check to see if it’s true but that seems a bit messy and slow.
The issue with that is that person detection takes a couple seconds. So when it triggers for motion, it might not have detected a person yet. I could do motion from off to on for 5 seconds or so, but was wondering if there was a better way to do it.
The template will still do that. It will trigger when both conditions in the trigger are met.
if the sensor detects motion, it will be ‘on’ but personDetected will be false. So it does nothing. If sensor stays on and personDetected changes to true, it will then trigger. However if motion turns off and personDetected changes to true, it will not trigger.