mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-10-09 15:48:10 +00:00
Add Phyn Leak Detection Notification Automation
Implemented a persistent notification for critical leak detection alerts in phynplus.yaml. Added automation to dismiss the notification when the water valve is opened, ensuring users are informed and can take necessary actions. This enhances the overall functionality and user experience of the Phyn integration. #1531
This commit is contained in:
@@ -37,6 +37,17 @@ automation:
|
||||
icon2: 'sfsymbols:clock'
|
||||
level: 'critical'
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: '🚨 Phyn Leak Detection Alert'
|
||||
message: |
|
||||
**CRITICAL**: Phyn has detected a potential leak and automatically shut off the main water supply.
|
||||
|
||||
**Action Required**: Please verify there are no leaks in the house before turning the water back on.
|
||||
|
||||
**Time**: {{ now().strftime('%Y-%m-%d %H:%M:%S') }}
|
||||
notification_id: 'phyn_leak_detection'
|
||||
|
||||
- alias: Turn Phyn Water On
|
||||
id: 1f295bb8-8925-4b22-PHYN-9fe079b295a8
|
||||
trigger:
|
||||
@@ -48,6 +59,10 @@ automation:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: valve.phyn_shutoff_valve
|
||||
|
||||
- service: persistent_notification.dismiss
|
||||
data:
|
||||
notification_id: 'phyn_leak_detection'
|
||||
|
||||
- service: script.notify_engine
|
||||
data:
|
||||
title: 'Phyn Leak Detection'
|
||||
@@ -82,3 +97,16 @@ automation:
|
||||
icon1: 'sfsymbols:arrow.up.circle'
|
||||
icon2: 'sfsymbols:clock'
|
||||
level: 'critical'
|
||||
|
||||
- alias: Dismiss Phyn Notification When Valve Opens
|
||||
id: 3f295bb8-8925-4b22-PHYN-9fe079b295a8
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: valve.phyn_shutoff_valve
|
||||
to: 'open'
|
||||
action:
|
||||
- service: persistent_notification.dismiss
|
||||
data:
|
||||
notification_id: 'phyn_leak_detection'
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user