Hi, everyone, I’m really sorry I’m the slow old dude that is trying to learn some new tricks. I’m trying to make my garage door close after being open more than 15 min. I would like to get a text telling me that my garage is going to close. I want a 60 sec delay. I want to stop the closing indefinitely if I respond no, or be able to give a specific time in min to delay the closing. If I do not respond I want the door to close. Is this even possible, will I have to manually restart the automation if I hit no?
Here is the primary automation.
id: ‘1692318118861’
alias: close garage test
description: ‘’
trigger:
I’ll give you a brief outline, but first some housekeeping.
Most importantly, you need to format your code as code using the </> button. Indentation is vital in YAML. It’s hard to help if we can’t read your config properly, and it’s difficult to copy and paste to fix it.
The other thing is: refrain from using devices IDs. There are some reasons not that I’m not going to repeat, but you’ll find posts on the topic. Use entity IDs and matching services instead.
Right, so, the best way to do what you want is to break up your automations. One should trigger on the door opening. You’ll start a timer.
Example:
The next automation will be one to trigger when the timer runs out (expires). In there, you can send a push notification to the companion app. Specifically, it can be an actionable notification. You’ll provide an action to close the door. This gets sent as a special event to HA.
Example:
The third automation will trigger on this event and close the door.
Example:
You can do more things like having more actions to extend the timer, or to restart it, or to restart the timer when it had run out as a way get repeated notifications.
Example:
EDIT: Added some examples. I make heavy use of templating, so for a new starter it might take some time to get to terms with it. This was also written 3 years ago, so there might be improvements that could be made too, but it’s been working without any issues.
Yes, this whole thing has a huge learning curve. However, all of the help that is available makes it seem possible. I’m going to keep plugging away. Once I get to a point where I am lost (which will no doubt be soon) I am going to correctly post the code to get pointed back in the right direction. My wife keeps asking since I’m getting so frustrated, why it matters if I can automate this or not, because it just does, man. It just does. Thanks for understanding.