Last active
March 19, 2026 19:51
-
-
Save bbbenji/6119ca14cad765b03ef4d41d52307688 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blueprint: | |
| name: "Actionable Leak Alert (Critical)" | |
| description: "Sends a high-priority, critical notification with a direct link to your dashboard when a leak is detected." | |
| domain: automation | |
| input: | |
| moisture_sensors: | |
| name: Moisture Sensors | |
| description: "Select one or multiple leak/moisture sensors." | |
| selector: | |
| entity: | |
| multiple: true | |
| filter: | |
| device_class: moisture | |
| notify_device: | |
| name: Notify Device | |
| description: "The mobile device to receive the critical alert." | |
| selector: | |
| device: | |
| integration: mobile_app | |
| dashboard_path: | |
| name: Dashboard Path | |
| description: "The relative path to open when the notification is tapped (e.g., /lovelace/floors)." | |
| default: "/lovelace/0" | |
| selector: | |
| text: | |
| trigger: | |
| - platform: state | |
| entity_id: !input moisture_sensors | |
| to: "on" | |
| # No condition needed if the selector is already filtered to moisture sensors | |
| condition: [] | |
| action: | |
| # 1. Send Critical Mobile Notification | |
| - device_id: !input notify_device | |
| domain: mobile_app | |
| type: notify | |
| title: "🚨 WATER LEAK DETECTED" | |
| message: > | |
| {{ trigger.to_state.name }} is reporting a leak! | |
| Detected at: {{ now().strftime('%H:%M:%S') }} | |
| data: | |
| # Critical Alert Settings | |
| push: | |
| sound: | |
| name: "default" | |
| critical: 1 | |
| volume: 1.0 | |
| ttl: 0 | |
| priority: high | |
| # Click Action | |
| clickAction: !input dashboard_path | |
| # 2. Create Persistent Notification in HA UI | |
| - service: notify.persistent_notification | |
| data: | |
| title: "Leak Alert: {{ trigger.to_state.name }}" | |
| message: "A leak was detected by {{ trigger.to_state.name }}. Please check the area immediately." | |
| notification_id: "leak_alert_{{ trigger.entity_id.split('.')[1] }}" | |
| mode: parallel | |
| max: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment