From 773f58513ff4dd4c112ae16d1dc9d55639759274 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Fri, 21 Aug 2026 17:08:11 -0400 Subject: [PATCH] Expand Rheem diagnostics and Kiosk Satellite staging --- config/dashboards/README.md | 2 + .../partials/home_sections.yaml | 15 +- .../partials/home_water_sections.yaml | 32 ++ .../partials/kiosk_sections.yaml | 6 +- .../kiosk_satellite_staging/dashboard.yaml | 2 + .../partials/home_sections.yaml | 50 ++- .../views/01_home.yaml | 2 + config/packages/infrastructure.yaml | 43 +++ config/packages/kiosk_tablet.yaml | 23 +- config/packages/rheem_econet.yaml | 343 +++++++++++++++++- 10 files changed, 504 insertions(+), 14 deletions(-) diff --git a/config/dashboards/README.md b/config/dashboards/README.md index 56251cd6..0c76cbfe 100644 --- a/config/dashboards/README.md +++ b/config/dashboards/README.md @@ -66,6 +66,8 @@ This folder holds YAML-managed Home Assistant Lovelace dashboards and UI resourc The displays share only the reusable event and screen-policy state they need. Kitchen keeps its clock/current-weather/forecast banner and rotating household context, including the next confirmed cruise countdown, while the fixed-landscape Bedroom dashboard omits the redundant clock and uses that space for the next wake alarm, security/weather context, larger Front Lawn and Driveway feeds, and a readable household alert. Both use the same Garage-then-Front-Door event priority, with Garage held for three minutes after both doors close before the default dashboard returns. The canonical Bedroom Lovelace view and its Android 5 lightweight renderer consume the same camera, header, and alert sensors; the renderer bypasses only the unsupported Home Assistant frontend on the frozen Fire WebView. Kitchen uses native Kiosk Satellite camera overlays and idle dimming; Home Assistant handles only household sleep/away enforcement, volume, and event-camera wake instead of periodically forcing the screen on. Nearby rain or lightning starts one five-minute NOAA radar takeover during daylight; afterward, the rotating Storms Approaching banner can replay the latest 20-minute radar loop while the weather event remains active. Actionable NWS, package, family-location, entry-point, Phyn, and low-hot-water slides open a shared short-lived detail surface; the family map centers only the person named by the tapped slide and shows that person's prior 24-hour trail, while a closed Phyn main valve can be restored only from its detail view after explicit confirmation. The ambient wall remains in place after sunset. True idle panel-off remains disabled until the Crown LineageOS device has a reliable motion-wake input. Its device schedule changes the Home Assistant theme between light at 07:00 and dark at 19:00. Other clients follow their own system preference. +Kitchen's native Kiosk Satellite overlays use the imported Home Assistant camera entities, with HLS preferred over WebRTC on the Fire/WebView-class Kitchen Show display. + ### How it is wired into Home Assistant This folder is referenced from `config/configuration.yaml` via: - `lovelace.resource_mode: yaml` diff --git a/config/dashboards/infrastructure/partials/home_sections.yaml b/config/dashboards/infrastructure/partials/home_sections.yaml index dbe23776..a254c986 100644 --- a/config/dashboards/infrastructure/partials/home_sections.yaml +++ b/config/dashboards/infrastructure/partials/home_sections.yaml @@ -6,12 +6,14 @@ # Systems Partial - operations summary # House-system health strip, active issues, and datacenter status. # ------------------------------------------------------------------- +# Related Issue: 1890 # Notes: The health ribbon mirrors the visible dashboard navigation order and labels. # Notes: DNS and external-monitoring faults roll up under Network instead of duplicating it. # Notes: Network trend panels live on Network so Overview stays focused on broad house status. # Notes: Power & Solar shows realtime flow; accumulated history remains in Energy. # Notes: Scheduled Proxmox maintenance and sustained WAN quality/reset warnings render amber; critical conditions remain red. # Notes: Active Issue rows enumerate faults, scheduled maintenance, and reset urgency so drill-down is optional for initial triage. +# Notes: Home Water and Systems surface normalized Rheem faults; telemetry-only loss renders amber. # Notes: Back to Overview is the first control in the landing-view navigation strip. ###################################################################### @@ -59,22 +61,31 @@ raw_suffix: ACTIVE warning_entity_ids: - binary_sensor.infra_wan_sustained_degradation + - binary_sensor.rheem_wh_telemetry_stale critical_entity_ids: - binary_sensor.infra_wan_critical - binary_sensor.infra_dns_pihole_degraded - binary_sensor.infra_compute_degraded - binary_sensor.infra_storage_degraded - binary_sensor.infra_external_monitoring_degraded + - binary_sensor.rheem_wh_active_alert + - binary_sensor.garage_phyn_leak_alert - type: custom:button-card template: bearstone_infra_status_kpi - entity: binary_sensor.garage_phyn_leak_alert + entity: binary_sensor.home_water_problem name: Home Water icon: mdi:shield-water-outline variables: ok_state: 'off' healthy_text: CLEAR - alert_text: LEAK + warning_text: TELEMETRY + alert_text: CHECK + critical_entity_ids: + - binary_sensor.rheem_wh_active_alert + - binary_sensor.garage_phyn_leak_alert + warning_entity_ids: + - binary_sensor.rheem_wh_telemetry_stale tap_action: action: navigate navigation_path: /dashboard-infrastructure/home-water diff --git a/config/dashboards/infrastructure/partials/home_water_sections.yaml b/config/dashboards/infrastructure/partials/home_water_sections.yaml index 140317e2..0df3f83e 100644 --- a/config/dashboards/infrastructure/partials/home_water_sections.yaml +++ b/config/dashboards/infrastructure/partials/home_water_sections.yaml @@ -6,9 +6,11 @@ # Systems Partial - Home Water # Protection, live use, hot water, maintenance, outdoor water, and trends. # ------------------------------------------------------------------- +# Related Issue: 1890 # Notes: NAS, NVR, and unrelated house-temperature cards are omitted; refrigerator temperature stays with home safety. # Notes: Maintenance rows reuse existing reset scripts through safe more-info flows. # 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 prioritizes the next maintenance action and frequent controls without hidden grid placeholders. # Notes: Refrigerator temperature remains a temporary Home Maintenance overview item until a better permanent view is chosen. @@ -451,6 +453,30 @@ 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 @@ -485,6 +511,12 @@ 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 diff --git a/config/dashboards/infrastructure/partials/kiosk_sections.yaml b/config/dashboards/infrastructure/partials/kiosk_sections.yaml index 8c2d30a4..6e1f2235 100644 --- a/config/dashboards/infrastructure/partials/kiosk_sections.yaml +++ b/config/dashboards/infrastructure/partials/kiosk_sections.yaml @@ -61,7 +61,11 @@ warning_text: UPDATE AVAILABLE alert_text: NEEDS ATTENTION state_display: > - [[[ return String(entity?.attributes?.status ?? entity?.state ?? 'unknown').toUpperCase(); ]]] + [[[ + const updateAvailable = states['update.kitchen_show_update']?.state === 'on'; + if (entity?.state === 'off') return updateAvailable ? 'UPDATE AVAILABLE' : 'ONLINE'; + return String(entity?.attributes?.status ?? entity?.state ?? 'unknown').toUpperCase(); + ]]] tap_action: action: navigate navigation_path: /dashboard-kiosk-satellite-staging/home diff --git a/config/dashboards/kiosk_satellite_staging/dashboard.yaml b/config/dashboards/kiosk_satellite_staging/dashboard.yaml index 834ac6e8..9c397e98 100644 --- a/config/dashboards/kiosk_satellite_staging/dashboard.yaml +++ b/config/dashboards/kiosk_satellite_staging/dashboard.yaml @@ -6,8 +6,10 @@ # Kiosk Satellite Staging Dashboard - Shared tablet camera surface # Landscape-first Home Assistant dashboard for Kiosk Satellite devices. # ------------------------------------------------------------------- +# Related Issue: 1895 # Notes: Hidden preview dashboard; the production Bedroom kiosk remains unchanged. # Notes: Contains no tablet controls; Kiosk Satellite handles native camera overlays. +# Notes: Kitchen Show uses imported Home Assistant cameras with HLS preferred over WebRTC for Fire/WebView playback. ###################################################################### title: Kiosk Satellite Preview diff --git a/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml b/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml index 4fe84ef0..82cdf3a1 100644 --- a/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml +++ b/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml @@ -6,13 +6,17 @@ # Kiosk Satellite Partial - Ambient kitchen display # Enlarged camera feeds plus rotating household reminders, cruise countdown, and locations. # ------------------------------------------------------------------- +# Related Issue: 1890 +# Related Issue: 1895 # Notes: Three-row landscape layout uses full-width clock and alert banners around the camera row. # Notes: Camera cards use automatic streaming to limit idle tablet load. # Notes: Native Garage and Front Door views take over for their matching live states. +# Notes: Kitchen Show Kiosk Satellite imports the HA camera sources and prefers HLS for native camera playback on Fire/WebView displays. # Notes: Nearby rain or lightning starts a five-minute NOAA radar view only while the sun is above the horizon. # Notes: After radar returns to the ambient wall, Storms Approaching offers another five-minute replay from the lower banner. # Notes: Actionable banner slides open one shared full-screen detail surface and return automatically to the ambient wall. # Notes: Family detail centers only the selected person and includes the prior 24-hour trail; Phyn detail includes a confirmed main-valve restore action. +# Notes: Rheem problem telemetry adds a red/amber water-heater slide and enriches the existing hot-water detail. # Notes: The large-format lower panel otherwise mirrors read-only household fact entities. # Notes: The clock uses oversized time text and places live conditions beneath the current-weather icon. ###################################################################### @@ -184,6 +188,11 @@ - group.locks - binary_sensor.front_door_packages_present - sensor.rheem_wh_available_hot_water + - sensor.rheem_wh_alert_count + - sensor.rheem_wh_diagnostic_status + - binary_sensor.rheem_wh_problem + - binary_sensor.rheem_wh_active_alert + - binary_sensor.rheem_wh_telemetry_stale - binary_sensor.rheem_wh_running - sensor.rheem_wh_tank_health - sensor.rheem_wh_compressor_health @@ -426,8 +435,31 @@ }); } + const rheemAlertCount = Number.parseInt(state('sensor.rheem_wh_alert_count'), 10); + const rheemStatus = state('sensor.rheem_wh_diagnostic_status'); + const rheemProblem = state('binary_sensor.rheem_wh_problem') === 'on'; + if (rheemProblem) { + const activeAlert = state('binary_sensor.rheem_wh_active_alert') === 'on'; + const telemetryStale = state('binary_sensor.rheem_wh_telemetry_stale') === 'on'; + items.push({ + kicker: telemetryStale && !activeAlert ? 'WATER HEATER TELEMETRY' : 'WATER HEATER ALERT', + title: activeAlert && Number.isFinite(rheemAlertCount) + ? `${rheemAlertCount} active ${rheemAlertCount === 1 ? 'alert' : 'alerts'}` + : `Rheem status: ${pretty(rheemStatus)}`, + detail: telemetryStale + ? 'EcoNet data has been unavailable for 10 minutes · Tap for diagnostics' + : 'Home Assistant Repairs has the diagnostic snapshot · Tap for details', + icon: 'mdi:water-boiler-alert', + accent: telemetryStale && !activeAlert ? '#ef6c00' : '#c62828', + action: { + service: 'kitchen_kiosk_show_detail', + data: {detail_type: 'hot_water'} + } + }); + } + const hotWater = Number.parseFloat(state('sensor.rheem_wh_available_hot_water')); - if (Number.isFinite(hotWater) && hotWater < 30) { + if (!rheemProblem && Number.isFinite(hotWater) && hotWater < 30) { items.push({ kicker: 'HOT WATER', title: 'Hot water is running low', @@ -706,15 +738,20 @@ `; } else if (detailType === 'hot_water') { const available = Number.parseFloat(state('sensor.rheem_wh_available_hot_water')); + const alertCount = Number.parseInt(state('sensor.rheem_wh_alert_count'), 10); + const diagnosticStatus = state('sensor.rheem_wh_diagnostic_status'); + const rheemProblem = state('binary_sensor.rheem_wh_problem') === 'on'; const heater = states['water_heater.rheem_wh']; const running = state('binary_sensor.rheem_wh_running') === 'on'; const target = Number.parseFloat(heater?.attributes?.temperature); const mode = pretty(heater?.attributes?.operation_mode || heater?.state); const tankHealth = Number.parseFloat(state('sensor.rheem_wh_tank_health')); const compressorHealth = Number.parseFloat(state('sensor.rheem_wh_compressor_health')); - kicker = 'HOT WATER RECOVERY'; - title = running ? 'Heating now' : 'Standing by'; - icon = 'mdi:water-boiler'; + kicker = rheemProblem ? 'WATER HEATER ALERT' : 'HOT WATER RECOVERY'; + title = rheemProblem && Number.isFinite(alertCount) && alertCount > 0 + ? `${alertCount} active ${alertCount === 1 ? 'alert' : 'alerts'}` + : (running ? 'Heating now' : 'Standing by'); + icon = rheemProblem ? 'mdi:water-boiler-alert' : 'mdi:water-boiler'; body = html`
${Number.isFinite(available) ? Math.round(available) : '--'}%
@@ -725,6 +762,11 @@
TANK HEALTH${Number.isFinite(tankHealth) ? `${Math.round(tankHealth)}%` : 'Unknown'}
COMPRESSOR${Number.isFinite(compressorHealth) ? `${Math.round(compressorHealth)}%` : 'Unknown'}
+ ${rheemProblem ? html` +
+ STATUS: ${pretty(diagnosticStatus)} · ACTIVE ALERTS: ${Number.isFinite(alertCount) ? alertCount : 'Unknown'} · Check Repairs or the Rheem message for the vendor error text. +
+ ` : ''} `; } diff --git a/config/dashboards/kiosk_satellite_staging/views/01_home.yaml b/config/dashboards/kiosk_satellite_staging/views/01_home.yaml index 7a7100c4..a4c57c41 100644 --- a/config/dashboards/kiosk_satellite_staging/views/01_home.yaml +++ b/config/dashboards/kiosk_satellite_staging/views/01_home.yaml @@ -7,9 +7,11 @@ # Shared landscape view for Kiosk Satellite and Fully Kiosk tablets. # ------------------------------------------------------------------- # Related Issue: 1875 +# Related Issue: 1895 # Notes: The Kitchen Show is the reference implementation for this shared view. # Notes: Panel mode removes unused top padding while the inner layout preserves safe side margins. # Notes: The Kitchen Show uses a fixed dark theme for maximum distance readability. +# Notes: Kiosk Satellite 2026.8.65 imports the HA camera entities used by its native Garage and Front Door overlays, with HLS-first playback enabled on Kitchen Show. # Notes: Device-specific kiosk controls stay out of the shared dashboard. ###################################################################### diff --git a/config/packages/infrastructure.yaml b/config/packages/infrastructure.yaml index 059df3ef..a4b1dfcc 100644 --- a/config/packages/infrastructure.yaml +++ b/config/packages/infrastructure.yaml @@ -9,6 +9,7 @@ # Blog: https://www.vcloudinfo.com/2026/08/home-assistant-internet-speed-monitoring-ookla.html # ------------------------------------------------------------------- # Related Issue: 1584 +# Related Issue: 1890 # Notes: Home dashboard consumes `infra_*` entities for exceptions-only alerts. # Notes: WAN outages require all four independent ICMP/HTTPS probes to fail continuously for 2 minutes. # Notes: Continuous latency/loss determine WAN quality; Ookla throughput is a separate twice-daily capacity snapshot and never declares an outage. @@ -27,6 +28,7 @@ # Notes: Garage compute health uses the same 145 F threshold as the existing temperature notification. # Notes: Immediate website-down states create Repairs; the installed UptimeRobot integration exposes current state, not trend rollups. # Notes: Dashboard aggregate issue count is live-only; its underlying degraded sensors retain actionable history. +# Notes: Home Water rollup includes Rheem faults/telemetry loss plus active Phyn alerts and valve closure. ###################################################################### input_text: @@ -236,6 +238,7 @@ template: 'binary_sensor.infra_compute_degraded', 'binary_sensor.infra_storage_degraded', 'binary_sensor.infra_external_monitoring_degraded', + 'binary_sensor.home_water_problem', 'binary_sensor.kiosk_devices_need_attention' ] %} {{ expand(categories) | selectattr('state', 'eq', 'on') | list | count }} @@ -247,11 +250,51 @@ template: 'binary_sensor.infra_compute_degraded', 'binary_sensor.infra_storage_degraded', 'binary_sensor.infra_external_monitoring_degraded', + 'binary_sensor.home_water_problem', 'binary_sensor.kiosk_devices_need_attention' ] %} {{ expand(categories) | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | list }} - binary_sensor: + - name: "Home Water Problem" + unique_id: home_water_problem + device_class: problem + state: >- + {% set phyn_alerts = [ + 'binary_sensor.garage_phyn_battery_alert', + 'binary_sensor.garage_phyn_freeze_warning_alert', + 'binary_sensor.garage_phyn_high_pressure_alert', + 'binary_sensor.garage_phyn_leak_alert', + 'binary_sensor.garage_phyn_offline_leak_shutoff_alert', + 'binary_sensor.garage_phyn_pinhole_leak_alert', + 'binary_sensor.garage_phyn_recurring_flow_alert', + 'binary_sensor.garage_phyn_temperature_alert' + ] %} + {{ is_state('binary_sensor.rheem_wh_problem', 'on') + or expand(phyn_alerts) | selectattr('state', 'eq', 'on') | list | count > 0 + or states('valve.phyn_shutoff_valve') in ['closed', 'closing'] }} + attributes: + active_entities: >- + {% set monitored = [ + 'binary_sensor.rheem_wh_problem', + 'binary_sensor.garage_phyn_battery_alert', + 'binary_sensor.garage_phyn_freeze_warning_alert', + 'binary_sensor.garage_phyn_high_pressure_alert', + 'binary_sensor.garage_phyn_leak_alert', + 'binary_sensor.garage_phyn_offline_leak_shutoff_alert', + 'binary_sensor.garage_phyn_pinhole_leak_alert', + 'binary_sensor.garage_phyn_recurring_flow_alert', + 'binary_sensor.garage_phyn_temperature_alert' + ] %} + {% set active = expand(monitored) + | selectattr('state', 'eq', 'on') + | map(attribute='entity_id') | list %} + {% if states('valve.phyn_shutoff_valve') in ['closed', 'closing'] %} + {{ active + ['valve.phyn_shutoff_valve'] }} + {% else %} + {{ active }} + {% endif %} + - name: "Infra WAN Outage" unique_id: infra_wan_outage device_class: problem diff --git a/config/packages/kiosk_tablet.yaml b/config/packages/kiosk_tablet.yaml index ad01da72..b8633e59 100644 --- a/config/packages/kiosk_tablet.yaml +++ b/config/packages/kiosk_tablet.yaml @@ -7,12 +7,14 @@ # Keeps the Bedroom tablet stable and drives state-based Kitchen Show camera views. # ------------------------------------------------------------------- # Related Issue: 1875 +# Related Issue: 1890 +# Related Issue: 1895 # Notes: `/dashboard-bedroom/home` remains the canonical desktop/future-hardware route. # Notes: The Android 5 Fully tablet uses `/local/bedroom-kiosk.html`, a lightweight renderer. # Notes: Shared camera, header, and alert sensors keep both Bedroom renderers DRY. # Notes: Fully controls apply only to the legacy Bedroom tablet. # Notes: Kitchen Show uses Kiosk Satellite discovery entities; no screensaver helper is required. -# Notes: Kiosk Satellite 2026.8.49+ owns HA kiosk-mode hiding and connection recovery; no kiosk-mode custom resource is loaded. +# Notes: Kiosk Satellite 2026.8.65+ owns HA kiosk-mode hiding, connection recovery, HA camera import, and HLS-first playback; no kiosk-mode custom resource is loaded. # Notes: Kitchen Show stays dark while the house is empty or asleep and wakes only for occupied-house events. # Notes: Garage takes over while either door is moving/open and remains for three minutes after both close; Front Door takes over while unlocked. # Notes: At 07:00, Home Assistant stages a pending Kiosk Satellite release, then dispatches Joanna daily until installation is verified. @@ -20,12 +22,13 @@ # Notes: Fully auto-reload on screen-on/screensaver-stop is disabled to avoid motion wake reload loops. # Notes: Startup recovery waits for HA's initial websocket state burst to settle. # Notes: Brightness recovery only runs when both SleepIQ in-bed sensors are off. -# Notes: Fully availability/page/app/power plus Kitchen connectivity, last-seen/update/screenshot freshness feed Systems telemetry. +# Notes: Fully availability/page/app/power plus Kitchen connectivity, current-page/screenshot freshness, and update state feed Systems telemetry. # Notes: Kitchen updates are advisory telemetry and do not raise kiosk or Systems fault rollups. # Notes: Kiosk attention sensors expose only their stable status attribute so recorder preserves problem transitions without heartbeat churn. # Notes: Nearby daytime rain or lightning starts a five-minute NOAA radar view; the ambient banner offers daylight replay while the event remains active. # Notes: Actionable Kitchen banner slides open one shared short-lived detail surface; camera events retain priority. # Notes: Phyn detail can restore a closed main valve only after an explicit on-screen confirmation. +# Notes: Rheem faults outrank low-hot-water reminders and reuse the hot-water diagnostic detail surface. # Video: https://youtu.be/ChgEu0IDWzc ###################################################################### @@ -426,6 +429,7 @@ template: state: >- {% set alerts = state_attr('sensor.nws_alerts_alerts', 'Alerts') | default([], true) %} {% set hot_water = states('sensor.rheem_wh_available_hot_water') | float(100) %} + {% set rheem_alert_count = states('sensor.rheem_wh_alert_count') | int(0) %} {% set tomorrow = (now() + timedelta(days=1)).strftime('%Y-%m-%d') %} {% set battery = states('sensor.spaceship_battery_level') | float(100) %} {% set ns = namespace(name='', raw='') %} @@ -448,6 +452,8 @@ template: ENTRY POINT OPEN {% elif states('group.locks') not in ['locked', 'unknown', 'unavailable'] %} CHECK THE FRONT DOOR LOCK + {% elif rheem_alert_count > 0 %} + WATER HEATER ALERT - {{ rheem_alert_count }} ACTIVE {% elif hot_water < 30 %} HOT WATER IS RUNNING LOW {% elif now().strftime('%a') in ['Wed', 'Sun'] @@ -468,6 +474,7 @@ template: detail: >- {% set alerts = state_attr('sensor.nws_alerts_alerts', 'Alerts') | default([], true) %} {% set hot_water = states('sensor.rheem_wh_available_hot_water') | float(100) %} + {% set rheem_alert_count = states('sensor.rheem_wh_alert_count') | int(0) %} {% set tomorrow = (now() + timedelta(days=1)).strftime('%Y-%m-%d') %} {% set battery = states('sensor.spaceship_battery_level') | float(100) %} {% set ns = namespace(name='', raw='') %} @@ -491,6 +498,10 @@ template: Check the exterior doors and windows. {% elif states('group.locks') not in ['locked', 'unknown', 'unavailable'] %} Lock status is {{ states('group.locks') | replace('_', ' ') }}. + {% elif rheem_alert_count > 0 %} + Rheem reports {{ rheem_alert_count }} active {{ 'alert' if rheem_alert_count == 1 else 'alerts' }}. + Status is {{ states('sensor.rheem_wh_diagnostic_status') | replace('_', ' ') }}. + Check Home Assistant Repairs for the diagnostic snapshot. {% elif hot_water < 30 %} {{ hot_water | round(0) }}% is available - keep showers short. {% elif now().strftime('%a') in ['Wed', 'Sun'] @@ -641,7 +652,6 @@ template: attributes: status: >- {% set invalid = ['unknown', 'unavailable', 'none', ''] %} - {% set last_seen = as_timestamp(states('sensor.kitchen_show_last_seen'), 0) %} {% set screenshot = as_timestamp(states('sensor.kitchen_show_last_screenshot'), 0) %} {% set page = states('sensor.kitchen_show_current_page') %} {% set remote_admin = states('sensor.kitchen_show_remote_admin') %} @@ -649,8 +659,6 @@ template: {% set battery = states('sensor.kitchen_show_battery') | float(0) %} {% if connectivity != 'on' %} offline - {% elif last_seen == 0 or (as_timestamp(now()) - last_seen) > 300 %} - telemetry stale {% elif page in invalid or remote_admin in invalid %} telemetry unavailable {% elif '/dashboard-kiosk-satellite-staging/home' not in page %} @@ -857,7 +865,10 @@ script: or (normalized_type == 'phyn' and (phyn_alert or states('valve.phyn_shutoff_valve') != 'open')) or (normalized_type == 'hot_water' - and states('sensor.rheem_wh_available_hot_water') | float(100) < 30) + and ( + is_state('binary_sensor.rheem_wh_problem', 'on') + or states('sensor.rheem_wh_available_hot_water') | float(100) < 30 + )) ) }} detail_duration: >- {{ '00:05:00' if normalized_type in ['weather', 'phyn'] else '00:03:00' }} diff --git a/config/packages/rheem_econet.yaml b/config/packages/rheem_econet.yaml index a9150fd9..8d3e361b 100755 --- a/config/packages/rheem_econet.yaml +++ b/config/packages/rheem_econet.yaml @@ -7,17 +7,350 @@ # Related Issue: 1550 # Related Issue: 1820 # Related Issue: 1890 -# Logs hot-water availability alerts to Activity feed; keeps announcements. +# Normalizes EcoNet alerts, telemetry health, Repairs, and diagnostic snapshots. # ------------------------------------------------------------------- # Docs: https://www.home-assistant.io/integrations/econet/ | Existing notes: Issue #892 # Powerwall outage control for Rheem WH lives in config/packages/powerwall.yaml +# Notes: EcoNet exposes an alert count but not the vendor error code or message. +# Notes: New alert-count increases notify once; state changes and 15-minute reconciliation keep Repairs durable. +# Notes: A 10-minute EcoNet data gap is telemetry stale, not proof of a water-heater fault. ###################################################################### +############################################################################## +### Normalized alert and telemetry entities +############################################################################## + +template: + - binary_sensor: + - name: "Rheem WH Active Alert" + unique_id: rheem_wh_active_alert + device_class: problem + availability: "{{ is_number(states('sensor.rheem_wh_alert_count')) }}" + state: "{{ states('sensor.rheem_wh_alert_count') | int(0) > 0 }}" + attributes: + alert_count: "{{ states('sensor.rheem_wh_alert_count') | int(0) }}" + source: "econet_counter" + detail_level: "counter_only" + + - name: "Rheem WH Telemetry Stale" + unique_id: rheem_wh_telemetry_stale + device_class: problem + delay_on: "00:10:00" + delay_off: "00:01:00" + state: >- + {{ states('water_heater.rheem_wh') in ['unknown', 'unavailable'] + or states('sensor.rheem_wh_alert_count') in ['unknown', 'unavailable'] }} + attributes: + evaluation_window: "10 minutes" + monitored_entities: >- + {{ ['water_heater.rheem_wh', 'sensor.rheem_wh_alert_count'] }} + + - name: "Rheem WH Problem" + unique_id: rheem_wh_problem + device_class: problem + state: >- + {% set compressor = states('sensor.rheem_wh_compressor_health') %} + {% set tank = states('sensor.rheem_wh_tank_health') %} + {{ is_state('binary_sensor.rheem_wh_active_alert', 'on') + or is_state('binary_sensor.rheem_wh_telemetry_stale', 'on') + or (is_number(compressor) and compressor | float(100) < 90) + or (is_number(tank) and tank | float(100) < 90) }} + attributes: + reasons: >- + {% set compressor = states('sensor.rheem_wh_compressor_health') %} + {% set tank = states('sensor.rheem_wh_tank_health') %} + {% set ns = namespace(items=[]) %} + {% if is_state('binary_sensor.rheem_wh_active_alert', 'on') %} + {% set ns.items = ns.items + ['active_alert'] %} + {% endif %} + {% if is_state('binary_sensor.rheem_wh_telemetry_stale', 'on') %} + {% set ns.items = ns.items + ['telemetry_stale'] %} + {% endif %} + {% if is_number(compressor) and compressor | float(100) < 90 %} + {% set ns.items = ns.items + ['compressor_health'] %} + {% endif %} + {% if is_number(tank) and tank | float(100) < 90 %} + {% set ns.items = ns.items + ['tank_health'] %} + {% endif %} + {{ ns.items }} + + sensor: + - name: "Rheem WH Diagnostic Status" + unique_id: rheem_wh_diagnostic_status + icon: mdi:water-boiler-alert + state: >- + {% set alert_count = states('sensor.rheem_wh_alert_count') %} + {% set heater = states('water_heater.rheem_wh') %} + {% set compressor = states('sensor.rheem_wh_compressor_health') %} + {% set tank = states('sensor.rheem_wh_tank_health') %} + {% if is_state('binary_sensor.rheem_wh_telemetry_stale', 'on') %} + telemetry_stale + {% elif alert_count in ['unknown', 'unavailable'] or heater in ['unknown', 'unavailable'] %} + telemetry_pending + {% elif is_state('binary_sensor.rheem_wh_active_alert', 'on') %} + alert + {% elif (is_number(compressor) and compressor | float(100) < 90) + or (is_number(tank) and tank | float(100) < 90) %} + degraded + {% else %} + ok + {% endif %} + attributes: + alert_count: "{{ states('sensor.rheem_wh_alert_count') | int(0) }}" + compressor_health: "{{ states('sensor.rheem_wh_compressor_health') }}" + tank_health: "{{ states('sensor.rheem_wh_tank_health') }}" + active_since: >- + {{ states.binary_sensor.rheem_wh_active_alert.last_changed.isoformat() + if is_state('binary_sensor.rheem_wh_active_alert', 'on') else none }} + last_alert_at: "{{ states('sensor.rheem_wh_last_alert_snapshot') }}" + last_alert_count: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'alert_count') }} + last_alert_operation_mode: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'operation_mode') }} + last_alert_running_state: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'running_state') }} + last_alert_available_hot_water: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'available_hot_water') }} + vendor_error_code: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'vendor_error_code') + | default('not_exposed_by_econet', true) }} + vendor_error_message: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'vendor_error_message') + | default('not_exposed_by_econet', true) }} + + - triggers: + - trigger: state + entity_id: sensor.rheem_wh_alert_count + conditions: + - condition: template + value_template: >- + {{ trigger.from_state is not none + and trigger.to_state is not none + and is_number(trigger.from_state.state) + and is_number(trigger.to_state.state) + and trigger.to_state.state | int(0) > trigger.from_state.state | int(0) }} + sensor: + - name: "Rheem WH Last Alert Snapshot" + unique_id: rheem_wh_last_alert_snapshot + device_class: timestamp + icon: mdi:alert-decagram-outline + state: "{{ now().isoformat() }}" + attributes: + source: "econet_counter" + alert_count: "{{ trigger.to_state.state | int(0) }}" + previous_alert_count: "{{ trigger.from_state.state | int(0) }}" + operation_mode: "{{ states('water_heater.rheem_wh') }}" + running_state: "{{ states('sensor.rheem_wh_running_state') }}" + available_hot_water: "{{ states('sensor.rheem_wh_available_hot_water') }}" + compressor_health: "{{ states('sensor.rheem_wh_compressor_health') }}" + tank_health: "{{ states('sensor.rheem_wh_tank_health') }}" + wifi_signal: "{{ states('sensor.rheem_wh_wifi_signal') }}" + vendor_error_code: "not_exposed_by_econet" + vendor_error_message: "not_exposed_by_econet" + ############################################################################## ### Automations ############################################################################## automation: + - alias: "Rheem Water Heater Alert Incident" + id: rheem_water_heater_alert_incident + description: "Notify and dispatch one diagnostic snapshot when the native EcoNet alert count increases" + mode: queued + max: 5 + trigger: + - platform: state + entity_id: sensor.rheem_wh_last_alert_snapshot + condition: + - condition: template + value_template: >- + {% set detected = as_timestamp(trigger.to_state.state, 0) %} + {% set age = as_timestamp(now()) - detected %} + {{ detected > 0 and 0 <= age <= 120 }} + action: + - variables: + alert_count: >- + {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'alert_count') | int(0) }} + snapshot_summary: >- + Alert count {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'alert_count') | int(0) }}; + mode {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'operation_mode') | default('unknown', true) }}; + running {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'running_state') | default('unknown', true) }}; + hot water {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'available_hot_water') | default('unknown', true) }}%; + compressor health {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'compressor_health') | default('unknown', true) }}%; + tank health {{ state_attr('sensor.rheem_wh_last_alert_snapshot', 'tank_health') | default('unknown', true) }}%. + - service: script.send_to_logbook + data: + topic: "WATER" + message: "Rheem reported a new active alert. {{ snapshot_summary }}" + - service: script.notify_engine + data: + title: "Rheem water heater alert" + value1: >- + Rheem now reports {{ alert_count }} active {{ 'alert' if alert_count == 1 else 'alerts' }}. + value2: "{{ snapshot_summary }}" + value3: "Home Assistant Repairs contains the durable incident." + who: "parents" + group: "water_heater" + level: "time-sensitive" + - service: script.joanna_dispatch + data: + trigger_context: "HA automation rheem_water_heater_alert_incident (Rheem Water Heater Alert Incident)" + source: "home_assistant_automation.rheem_water_heater_alert_incident" + summary: "Rheem EcoNet reported a new active water-heater alert" + request: >- + Correlate this alert with Home Assistant history and recommend safe next steps. + Do not change the water-heater mode, reset the unit, or dismiss the Repair automatically. + entity_ids: + - sensor.rheem_wh_alert_count + - sensor.rheem_wh_diagnostic_status + - sensor.rheem_wh_last_alert_snapshot + - water_heater.rheem_wh + diagnostics: + alert_count: "{{ alert_count }}" + snapshot: "{{ snapshot_summary }}" + native_error_detail: "counter_only" + + - alias: "Rheem Water Heater Incident Reconcile" + id: rheem_water_heater_incident_reconcile + description: "Keep Rheem fault and telemetry-loss Repairs synchronized with normalized telemetry" + mode: restart + trigger: + - platform: time_pattern + minutes: "/15" + seconds: 2 + id: periodic + - platform: state + entity_id: sensor.rheem_wh_alert_count + id: alert_count + - platform: state + entity_id: + - sensor.rheem_wh_compressor_health + - sensor.rheem_wh_tank_health + id: health + - platform: state + entity_id: binary_sensor.rheem_wh_telemetry_stale + id: telemetry_state + - platform: state + entity_id: binary_sensor.rheem_wh_problem + id: problem_state + condition: + - condition: template + value_template: "{{ states('binary_sensor.rheem_wh_problem') in ['on', 'off'] }}" + action: + - variables: + alert_count: "{{ states('sensor.rheem_wh_alert_count') | int(0) }}" + diagnostic_status: "{{ states('sensor.rheem_wh_diagnostic_status') }}" + incident_title: >- + {% if is_state('binary_sensor.rheem_wh_active_alert', 'on') %} + Rheem water heater alert + {% elif is_state('binary_sensor.rheem_wh_telemetry_stale', 'on') %} + Rheem telemetry unavailable + {% else %} + Rheem water heater health degraded + {% endif %} + incident_description: |- + Home Assistant detected a Rheem water-heater problem. + + Status: {{ states('sensor.rheem_wh_diagnostic_status') }} + Active alert count: {{ states('sensor.rheem_wh_alert_count') }} + Operation mode: {{ states('water_heater.rheem_wh') }} + Running state: {{ states('sensor.rheem_wh_running_state') }} + Available hot water: {{ states('sensor.rheem_wh_available_hot_water') }}% + Compressor health: {{ states('sensor.rheem_wh_compressor_health') }}% + Tank health: {{ states('sensor.rheem_wh_tank_health') }}% + Last new-alert snapshot: {{ states('sensor.rheem_wh_last_alert_snapshot') }} + + EcoNet exposes the number of alerts but not the vendor error code or message. + Check the Rheem app or vendor email for the exact diagnostic wording. + - choose: + - conditions: + - condition: template + value_template: >- + {{ trigger.id == 'telemetry_state' + and trigger.from_state is not none + and trigger.to_state is not none + and trigger.from_state.state == 'off' + and trigger.to_state.state == 'on' }} + sequence: + - service: script.send_to_logbook + data: + topic: "WATER" + message: "Rheem EcoNet telemetry has been unavailable for 10 minutes." + - service: script.joanna_dispatch + data: + trigger_context: "HA automation rheem_water_heater_incident_reconcile (telemetry stale)" + source: "home_assistant_automation.rheem_water_heater_incident_reconcile.telemetry_stale" + summary: "Rheem EcoNet telemetry has been unavailable for 10 minutes" + request: >- + Investigate EcoNet connectivity and Home Assistant logs. + Do not reset credentials, change heater mode, or restart Home Assistant automatically. + entity_ids: + - binary_sensor.rheem_wh_telemetry_stale + - sensor.rheem_wh_diagnostic_status + - water_heater.rheem_wh + diagnostics: + status: "{{ diagnostic_status }}" + alert_count: "{{ states('sensor.rheem_wh_alert_count') }}" + - conditions: + - condition: template + value_template: >- + {{ trigger.id == 'telemetry_state' + and trigger.from_state is not none + and trigger.to_state is not none + and trigger.from_state.state == 'on' + and trigger.to_state.state == 'off' }} + sequence: + - service: script.send_to_logbook + data: + topic: "WATER" + message: "Rheem EcoNet telemetry recovered." + - choose: + - conditions: + - condition: state + entity_id: binary_sensor.rheem_wh_problem + state: "on" + sequence: + - service: repairs.create + data: + issue_id: "rheem_water_heater_problem" + domain: "econet" + title: "{{ incident_title }}" + severity: >- + {{ 'warning' + if is_state('binary_sensor.rheem_wh_telemetry_stale', 'on') + and not is_state('binary_sensor.rheem_wh_active_alert', 'on') + else 'error' }} + persistent: true + description: "{{ incident_description }}" + - service: persistent_notification.create + data: + notification_id: "rheem_water_heater_problem" + title: "{{ incident_title }}" + message: "{{ incident_description }}" + default: + - service: repairs.remove + continue_on_error: true + data: + issue_id: "rheem_water_heater_problem" + - service: persistent_notification.dismiss + continue_on_error: true + data: + notification_id: "rheem_water_heater_problem" + - choose: + - conditions: + - condition: template + value_template: >- + {{ trigger.id == 'problem_state' + and trigger.from_state is not none + and trigger.to_state is not none + and trigger.from_state.state == 'on' + and trigger.to_state.state == 'off' }} + sequence: + - service: script.send_to_logbook + data: + topic: "WATER" + message: "Rheem water-heater problem cleared." + # Temporary safeguard for Rheem case CAS-2816630-Z7T2M6 / issue #1890. # Remove after the evaporator thermistor is replaced and compressor operation # has been verified. Off remains allowed for Powerwall outage load shedding. @@ -32,6 +365,7 @@ automation: entity_id: water_heater.rheem_wh - platform: time_pattern minutes: "/15" + seconds: 7 condition: - condition: template value_template: >- @@ -120,11 +454,18 @@ automation: # Available Rheem entities snapshot (for reference) # automation.rheem_water_heater_health_monitoring # automation.rheem_water_heater_hot_water_availability_alert +# automation.rheem_water_heater_alert_incident +# automation.rheem_water_heater_incident_reconcile +# binary_sensor.rheem_wh_active_alert +# binary_sensor.rheem_wh_problem # binary_sensor.rheem_wh_running # binary_sensor.rheem_wh_shutoff_valve +# binary_sensor.rheem_wh_telemetry_stale # sensor.rheem_wh_alert_count # sensor.rheem_wh_available_hot_water # sensor.rheem_wh_compressor_health +# sensor.rheem_wh_diagnostic_status +# sensor.rheem_wh_last_alert_snapshot # sensor.rheem_wh_override_status # sensor.rheem_wh_power_usage_today # sensor.rheem_wh_running_state