Time delay for location change

I have built a short automation to check on all door locks and lights and garage door while changing the location mode from Home to Away.
I found a flaw in my routine though… if the garage door is open, the routine closes it while changing th location, which then trips my alarm because the motion sensors in the garage see a motion (caused by the door closing down).
I was thinking it would be nice if we could place a time delay on the location mode.
This way i could in fact run the routine, close the door, tuen the lights off and in 30 seconds later, it would change the location mode to Armed Away…
Any ideas?

You could probably break it into multiple Routines and use the Edge Counter Utility to create the delay.

OK two different things there, Location Mode being the Home or Away status and Security Mode being the Armed Away. So I’m not quite sure of the flow.

I note that the Location Mode condition in routines doesn’t have the ‘Stays this status for how long?’ option. That’s a shame as that means you can’t get a delay there.

I find the idea of only arming when you know every is set correctly preferable to delaying on the assumption that it is.

What you could do is add an extra interstitial Location Mode. Let’s call it ‘SecurityCheck’.

When you detect that you are away you could set the Location Mode to ‘SecurityCheck’ and use that to trigger your check routines.

Rather than having a delay you could have a routine that checks the Location Mode and the state of your locks and doors as conditions (not preconditions) and use that to set your Location Mode to Away and set the Security Mode.

It might be that a virtual switch is a more practical alternative to the extra mode as you could check for that having been turned on for too long, meaning your garage door or locks aren’t secure. Or you could use both.

There will be plenty of variations though.

Thank you much