Repository navigation
Expand file tree
/
Copy pathhome_water_sections.yaml
More file actions
485 lines (444 loc) · 16.3 KB
/
Copy pathhome_water_sections.yaml
File metadata and controls
485 lines (444 loc) · 16.3 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Systems Partial - Water
# Protection, live use, hot water, salt, outdoor water, and trends.
# -------------------------------------------------------------------
# Related Issue: 1890, 1817
# Notes: NAS, NVR, and unrelated house-temperature cards are omitted; refrigerator temperature stays with home safety.
# Notes: HVAC maintenance has moved to the dedicated production HVAC view.
# Notes: Active Phyn leak alerts are shown; the integration's stale latest-test leak flag is not an operator alert.
# Notes: Rheem alert, health, and telemetry faults render as an exception row backed by durable Repairs.
# Notes: Daily usage uses change on the same sum-only statistic configured in Energy.
# Notes: The overview ribbon keeps water-softener salt maintenance visible and amber when due.
# Notes: Refrigerator temperature remains a temporary Home Safety overview item until a better permanent view is chosen.
######################################################################
# -------------------------------------------------------------------
# Water overview ribbon (mandatory first full-width wrapper)
# -------------------------------------------------------------------
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: custom:layout-card
grid_options:
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(7, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
margin: 0
mediaquery:
"(max-width: 900px)":
grid-template-columns: repeat(2, minmax(0, 1fr))
cards:
- type: custom:button-card
template: bearstone_infra_status_kpi
entity: sensor.water_softener_salt_days_since_last_add
name: Salt Maintenance
icon: mdi:shaker-outline
variables:
default_severity: healthy
numeric_warning_checks:
- entity_id: sensor.water_softener_salt_days_since_last_add
threshold_entity_id: sensor.water_softener_salt_average_days_between_refills
state_display: >
[[[
const current = Number(entity?.state);
const limit = Number(states['sensor.water_softener_salt_average_days_between_refills']?.state);
if (!Number.isFinite(current) || !Number.isFinite(limit) || limit <= 0) return 'NO DATA';
const remaining = Math.ceil(limit - current);
return remaining <= 0 ? 'DUE · SALT' : `${remaining}D LEFT`;
]]]
tap_action:
action: more-info
- type: custom:button-card
template: bearstone_infra_status_kpi
entity: valve.phyn_shutoff_valve
name: Water Protection
icon: mdi:valve
variables:
ok_state: open
healthy_text: OPEN
alert_text: CLOSED
tap_action:
action: more-info
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.rachio_controller_status
name: Sprinklers
icon: mdi:sprinkler-variant
state_display: >
[[[
const status = String(entity?.state ?? '').toLowerCase();
if (status === 'watering') {
const zones = String(entity?.attributes?.active_zones ?? '').trim();
return zones ? `RUNNING · ${zones.toUpperCase()}` : 'RUNNING';
}
if (status === 'rain_delay') return 'RAIN DELAY';
if (status === 'standby') return 'STANDBY';
if (['unknown', 'unavailable', 'none', ''].includes(status)) return 'OFFLINE';
return 'READY';
]]]
tap_action:
action: navigate
navigation_path: /dashboard-infrastructure/sprinklers
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.blink_blink1_temperature
name: Refrigerator
icon: mdi:fridge-outline
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.rheem_wh_available_hot_water
name: Hot Water
icon: mdi:water-thermometer
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.phyn_daily_water_usage
name: Used Today
icon: mdi:water-outline
- type: custom:button-card
template: bearstone_infra_kpi
entity: input_datetime.water_delivery_date
name: Next Delivery
icon: mdi:truck-delivery-outline
state_display: >
[[[
const raw = String(entity?.state ?? '');
const value = raw ? new Date(`${raw}T00:00:00`) : null;
if (!(value instanceof Date) || Number.isNaN(value.getTime())) return 'NO DATE';
const today = new Date();
today.setHours(0, 0, 0, 0);
const formatted = value.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }).toUpperCase();
return value < today ? `OVERDUE · ${formatted}` : formatted;
]]]
tap_action:
action: url
url_path: https://www.readyrefresh.com/en/login
# -------------------------------------------------------------------
# Home safety and outdoor water
# -------------------------------------------------------------------
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: custom:layout-card
grid_options:
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(3, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
margin: 0
mediaquery:
"(max-width: 900px)":
grid-template-columns: repeat(1, minmax(0, 1fr))
cards:
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Home Safety
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.blink_blink1_temperature
name: Refrigerator Temperature
icon: mdi:fridge-outline
state:
- operator: '>'
value: 60
styles:
card:
- border-color: rgba(229,57,53,0.35)
- background: rgba(255,235,238,0.85)
icon:
- color: rgba(198,40,40,1)
state:
- color: rgba(198,40,40,1)
- opacity: 1
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Water Delivery & Softener
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.water_softener_salt_last_summary
name: Last Salt Refill
icon: mdi:shaker
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.water_softener_salt_average_days_between_refills
name: Typical Salt Interval
icon: mdi:calendar-sync-outline
tap_action:
action: navigate
navigation_path: /dashboard-infrastructure/salt-trends
- type: custom:button-card
template: bearstone_infra_list_row
entity: input_datetime.water_delivery_date
name: Next Water Delivery
icon: mdi:truck-delivery-outline
state_display: >
[[[
const raw = String(entity?.state ?? '');
const value = raw ? new Date(`${raw}T00:00:00`) : null;
if (!(value instanceof Date) || Number.isNaN(value.getTime())) return 'NO DATE';
const today = new Date();
today.setHours(0, 0, 0, 0);
const formatted = value.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }).toUpperCase();
return value < today ? `OVERDUE · ${formatted}` : formatted;
]]]
- type: custom:button-card
template: bearstone_infra_list_row
name: Manage ReadyRefresh
icon: mdi:open-in-new
show_state: false
tap_action:
action: url
url_path: https://www.readyrefresh.com/en/login
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Outdoor Water
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rachio_controller_status
name: Sprinkler Controller
icon: mdi:sprinkler-variant
tap_action:
action: navigate
navigation_path: /dashboard-infrastructure/sprinklers
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rachio_active_zone
name: Active Zone
icon: mdi:sprinkler
- type: custom:button-card
template: bearstone_infra_list_row
entity: switch.carlo_rachio_rain_delay
name: Rain Delay
icon: mdi:weather-rainy
tap_action:
action: more-info
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rachio_last_run_summary
name: Last Sprinkler Run
icon: mdi:history
# -------------------------------------------------------------------
# Water protection and hot water
# -------------------------------------------------------------------
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: custom:layout-card
grid_options:
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(2, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
margin: 0
mediaquery:
"(max-width: 900px)":
grid-template-columns: repeat(1, minmax(0, 1fr))
cards:
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Water Protection
- type: custom:button-card
template: bearstone_infra_list_row
entity: valve.phyn_shutoff_valve
name: Main Shutoff Valve
icon: mdi:valve
- type: custom:button-card
template: bearstone_infra_list_row_running
entity: switch.phyn_autoshutoff_enabled
name: Automatic Shutoff
icon: mdi:shield-water-outline
tap_action:
action: more-info
- type: custom:button-card
template: bearstone_infra_list_row
entity: switch.phyn_scheduled_leak_test_enabled
name: Scheduled Leak Tests
icon: mdi:calendar-search
state_display: >
[[[
return entity?.state === 'on' ? 'ENABLED' : 'OFF';
]]]
tap_action:
action: more-info
- type: custom:button-card
template: bearstone_infra_list_row
entity: binary_sensor.phyn_leak_test_running
name: Leak Test Activity
icon: mdi:water-search
state_display: >
[[[
return entity?.state === 'on' ? 'RUNNING' : 'IDLE';
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.phyn_average_water_flow_rate
name: Current Flow Rate
icon: mdi:water-pump
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.phyn_current_water_pressure
name: Water Pressure
icon: mdi:gauge
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.phyn_average_water_temperature
name: Supply Temperature
icon: mdi:thermometer-water
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Hot Water System
- type: custom:button-card
template: bearstone_infra_alert_row
entity: binary_sensor.rheem_wh_problem
name: Rheem Needs Attention
icon: mdi:water-boiler-alert
variables:
alert_kind: binary_on
critical_entity_ids:
- binary_sensor.rheem_wh_active_alert
warning_entity_ids:
- binary_sensor.rheem_wh_telemetry_stale
exception_detail: >
[[[
const status = states['sensor.rheem_wh_diagnostic_status']?.state ?? 'unknown';
const count = states['sensor.rheem_wh_alert_count']?.state ?? 'unknown';
return `Status: ${String(status).replaceAll('_', ' ')} · Active alerts: ${count}`;
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_diagnostic_status
name: Diagnostic Status
icon: mdi:stethoscope
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_available_hot_water
name: Available Hot Water
icon: mdi:water-percent
- type: custom:button-card
template: bearstone_infra_list_row
entity: binary_sensor.rheem_wh_running
name: Heat Pump
icon: mdi:heat-pump-outline
state_display: >
[[[
return entity?.state === 'on' ? 'RUNNING' : 'IDLE';
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_running_state
name: Operating State
icon: mdi:state-machine
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_tank_health
name: Tank Health
icon: mdi:shield-check-outline
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_alert_count
name: Active Alerts
icon: mdi:alert-circle-outline
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.rheem_wh_last_alert_snapshot
name: Last New Alert
icon: mdi:alert-decagram-outline
- type: custom:button-card
template: bearstone_infra_list_row
entity: water_heater.rheem_wh
name: Water Heater Controls
icon: mdi:water-boiler
# -------------------------------------------------------------------
# Thirty-day water trends
# -------------------------------------------------------------------
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: custom:layout-card
grid_options:
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(2, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
margin: 0
mediaquery:
"(max-width: 900px)":
grid-template-columns: repeat(1, minmax(0, 1fr))
cards:
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Daily Water Use - 30 Days
# Fallback card: change uses the same sum-only long-term statistic as Energy.
- type: statistics-graph
chart_type: bar
days_to_show: 30
period: day
stat_types:
- change
entities:
- entity: sensor.phyn_daily_water_usage
name: Daily Usage
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Lowest Hot Water - 30 Days
# Fallback card: daily minimum shows whether household demand is outrunning recovery.
- type: statistics-graph
chart_type: line
days_to_show: 30
period: day
stat_types:
- min
entities:
- entity: sensor.rheem_wh_available_hot_water
name: Available Hot Water