-
-
Notifications
You must be signed in to change notification settings - Fork 503
Expand file tree
/
Copy pathphynplus.yaml
More file actions
executable file
·142 lines (125 loc) · 4.76 KB
/
Copy pathphynplus.yaml
File metadata and controls
executable file
·142 lines (125 loc) · 4.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Phyn Plus Water Shutoff - Leak detection and auto shutoff
# Related Issue: 1550
# Push action buttons + Activity feed + Repairs issue while valve is closed.
# -------------------------------------------------------------------
# Info: https://www.vcloudinfo.com/2020/05/phyn-plus-smart-water-shutoff-device.html
# Blog: https://www.vcloudinfo.com/2026/06/home-assistant-leak-detection-automations.html
# Video: https://youtu.be/xbhgWnomFYI
# HACS: https://github.com/jordanruthe/homeassistant-phyn
# Product: https://amzn.to/2Zy3sbJ
# Notes: This package references only Phyn entities confirmed in this HA registry.
# Notes: Add alert entities only after Home Assistant creates real registry entries.
######################################################################
script:
phyn_send_actionable_leak_notification:
alias: "Phyn Send Actionable Leak Notification"
mode: parallel
fields:
source:
description: "Caller context for trace/debug visibility."
example: "initial"
sequence:
- service: script.notify_engine_two_button
data:
title: "Phyn Leak Detection"
value1: "Phyn is sensing a leak and turned off the water. Please verify."
who: "parents"
group: "Phyn"
title1: "Turn Water On"
action1: "PHYN_WATER_ON"
title2: "Snooze 30m"
action2: "SNOOZE_PHYN_NOTIFICATION"
icon1: "sfsymbols:arrow.up.circle"
icon2: "sfsymbols:clock"
level: "critical"
automation:
- alias: 'Phyn ShutOff Notification'
id: 78bbd270-ee1e-4b3d-80fd-44ce7c66dab5
mode: single
trigger:
- platform: state
entity_id: valve.phyn_shutoff_valve
to: 'closed'
condition:
- condition: state
entity_id: binary_sensor.phyn_leak_test_running
state: 'off'
action:
- service: script.send_to_logbook
data:
topic: "WATER"
message: "Phyn detected a leak and shut off the water. Please verify."
- service: repairs.create
data:
issue_id: "phyn_leak_shutoff"
title: "Phyn leak shutoff"
severity: "critical"
persistent: true
description: >-
Phyn detected a potential leak and automatically closed the main water valve.
Verify there are no active leaks before restoring water service.
- service: script.phyn_send_actionable_leak_notification
data:
source: "initial"
- 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:
platform: event
event_type: mobile_app_notification_action
event_data:
action: PHYN_WATER_ON
action:
- service: valve.open_valve
target:
entity_id: valve.phyn_shutoff_valve
- service: script.notify_engine
data:
title: 'Phyn Leak Detection'
value1: 'Request Received. Attempting to Turn the Water back on.'
who: 'parents'
group: 'Phyn'
level: 'time-sensitive'
- service: script.speech_engine
data:
value1: >
I have been asked to Turn the House Water back on. Please verify there are no leaks in the house.
call_no_announcement: 1
- alias: Snooze Phyn Notification
id: 2f295bb8-8925-4b22-PHYN-9fe079b295a8
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: SNOOZE_PHYN_NOTIFICATION
action:
- delay: '00:30:00'
- service: script.phyn_send_actionable_leak_notification
data:
source: "snooze"
- 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: repairs.remove
continue_on_error: true
data:
issue_id: "phyn_leak_shutoff"
- service: persistent_notification.dismiss
data:
notification_id: 'phyn_leak_detection'