Notification if Door or Window is left open

I think it would be a good idea if the automation would send an “all clear” when the state of the sensor is finally restored. Then you would know if e.g. the door was already shut by someone, or does it still need closing.

Any ideas on how to achieve this? Thank you.

1 Like

I’ve done this before, but opted to not include it into this blueprint. Take a look into “notification replacement” to avoid having notifications pile up and make a wait until trigger for when the door is closed again before sending a notification.

I’m using clear_notification for this purpose: Introduction | Home Assistant Companion Docs

Hey there,

I wanted to express my gratitude for the fantastic work on the original blueprint. Inspired by @Neekster’s version, I’ve created an enhanced version with additional features and improvements. If you’re looking for:

  • Clear Notifications: Clear the notification when, for instance, a door or window has been closed again, so you know there’s no need to worry.
  • Flexible Notification Services: I’ve added the option to notify multiple devices directly without relying on notify groups. Simply list your desired notify services, separated by commas.
  • Input Boolean Support: Now you can use both binary_sensor and input_boolean domains as trigger entities.

Check out the extended blueprint here for more details. I am looking forward to your feedback! :rocket:

1 Like

I wanted the notification to provide a more useful result so I spent some time figuring out how to display how many minutes the door has been left open.

Changed Msg title to “{{ friendly_name }} has been open for "
changed MSG to “{{ (as_timestamp(now()) - as_timestamp(as_datetime(initially_triggered_at, default))) | timestamp_custom(”%M”, false) }} minutes."

Hope that helps someone!
Just realized this likely only shows the HH:MM:SS minute value… not sure what happens after 61 mins… might display 1min… but anyways I still think it helps!

Change “%M” to “%H:%M” to get hours too…

2 Likes