Looking to receive a quick heads-up if a door or window has been left open for a specific duration? You’re in the right place! This blueprint is designed for just that. It’s the ideal solution for those who want a notification when a door or window remains open for a set amount of time.
You might think, “Can’t I achieve this with a simple automation?” Well, you could, but why go through the hassle of setting up all the intricate details when this blueprint comes feature-rich and ready to go? It neatly encapsulates all the necessary elements, saving you time and effort in crafting intricate automations.
I’m thrilled to introduce an upgraded version of the Contact Sensor Left Open Notification blueprint, inspired by the fantastic work of @Neekster (check it out here). This update not only modernizes the selectors but also brings in some cool functionalities based on things that I found the original blueprint was lacking.
What’s New and Improved
Smart Notification Management
Clear Notifications: Now, the blueprint automatically clears a notification if, for example, your spouse closes the window. No more unnecessary alerts, just the info you need.
Flexible Notification Delivery
Multiple Notify Services: Forget about notify groups! Customize your notifications by providing a list of notify services separated by commas. Now, it’s super easy to notify multiple devices.
Extended Entity Support
Input Boolean Compatibility: Alongside the traditional binary sensor support, I’ve added compatibility with the input_boolean
domain as a trigger entity. More flexibility, more control.
Blueprint Code
Click the badge to import this Blueprint:
Configuration / Functionality
Let’s take a quick tour of the essential configuration options:
- Entity: Define the entity triggering the automation (binary_sensor or input_boolean). Use binary grouping of entities to avoid creating individual automations for each entity.
- Custom Device Friendly Name: Set a personalized name for the entity in the notification. Defaults the entities
friendly_name
if left empty. This also supports enumeration withbinary_sensor
groups. - Issue State: Specify the state triggering the automation (on/off for binary sensors).
- Time before alert: Set the duration before an alert is triggered to find the right balance.
- Additional condition: Define a condition that is checked after the initial trigger before the notification is sent.
- Delete notification when not in issue state anymore: Opt for automatic notification deletion when the issue is resolved.
- Time from issue state before alert removal: Fine-tune the duration before removing the alert.
- Notify Service: Choose the service delivering the notification and even notify multiple devices with a comma-separated list.
- Click URL: Define the destination when tapping the notification (e.g., control panels).
- Notification Title: Customize the title for quick context understanding.
- Notification Message: Craft a personalized message for the notification.
- Repeat Notification: Whether or not a notification should be repeated after a certain time.
- Time Between Repeat: Time period after which the repeat notification is triggered.
- Notification Icon (Android Only): Choose an icon representing the reported issue.
- Notification Color (Android Only): Pick a color for visual distinction.
- Persistent Notification (Android Only): The notification cannot be closed manually.
- Interruption Level (iOS Only): Define the intrusiveness and delivery during focus modes.
- Custom Action Issue State: Custom actions that are executed when the device state enters the issue state.
- Custom Action From Issue State: Custom actions that are executed when the device state exits the issue state.
Feel free to customize these settings to match your preferences and smart home requirements.
Changelog
Stay tuned for updates on the Enhanced Contact Sensor Left Open Notification Blueprint:
- 2024-04-23
- Added a highly requested feature: By using a
binary_sensor
group you now just need to have one automation. And the best part is if you leave the Custom Device Friendly Name field empty this defaults to thefriendly_name
of the entity and also expands thebinary_sensor
group. This means inside the notification you can now see which exact sensor(s) is in the Issue State. Thanks to @123 for this blogpost. - Added a variable named
triggered_at
which you can use inside the Notification Title/Message. Inside this variable the actual initial trigger time gets stored and does not change repeatedly when using the Repeat Notification option. - Added a version to the description part of the blueprint so you know if you are running the current version. Thanks @chris400!
- Added links to various documentation pages to make this blueprint more self explanatory.
- Added a highly requested feature: By using a
- 2024-04-05: Added icons for
mdi:window-closed
,mdi:window-open
andmdi:window-open-variant
. Thanks @meiser for pointing out that these were missing! - 2024-03-05: Major Update! Added condition on trigger, repetitive notifications with custom time interval, two action selectors to run additional actions when state changes to and from issue state in parallel with notification, an option to use persistent notifications on android, and fixed notification tag length being too long
- 2023-12-10: Now the previous “fix” actually was fixed.
- 2023-12-08: Due to some formatting changes when importing the blueprint via the gist destroyed the clear notification feature. I fixed that.
- 2023-12-08: Initial version
I’d love to hear your thoughts and experiences. Happy automating!