NOTE: Although the stuff in this post should still work, the HA devs put out an ‘Alert’ component shortly after I wrote this that does pretty much the same thing. I’ve created an updated post about it HERE. I am going to leave this post up as I feel that it might still be useful to accomplish other tasks.

This blog post builds on my last post about the Wemos D1 Mini Garage Door Controller.

Sending a notification via Home Assistant is a simple process, and it is mostly well documented. However, I had trouble finding a solution that repeatedly sends a notification about a device state until that state changes. In this case, I wanted something to notify me when my garage door is open for a while, and then continue sending me notifications every 30 minutes until it’s closed.

The solution I came up with isn’t as elegant as I would have preferred, but it works well. If anyone has any suggestions on a better method, please let me know. The way I did it involves 2 automations and 2 scripts.

Here are the automations that kick off the first script when the door is opened, and then turn the scripts off when the door is closed:

And here are the scripts. When the first script is launched, it will wait 30 minutes, send a notification, and then kick off the second script script. The second script does the same thing and kicks off the first script. The cycle will continue until the garage door closes which triggers the second automation that turns off both scripts.

The notification sends the current time because on my iPhone, the pushbullet app wasn’t displaying the time of the notification. In the message body, it sends the amount of time that the door has been open.

4 Replies to “Use Home Assistant to Send a Notification at a Specific Interval When the Door is Left Open

    1. Oh I know. I had mixed feelings when I saw that. I spent a lot of time getting this script working but I’m also glad they built something native.

Leave a Reply

Your email address will not be published. Required fields are marked *