From 41116c7feb268ee8175430269fc7e4caed4df2b8 Mon Sep 17 00:00:00 2001 From: reachableceo Date: Fri, 4 Sep 2026 06:04:19 -0500 Subject: [PATCH] feat(alerts): deep-link taps to UPS/Temps/Overview views [#344] clickAction (Android) + url (iOS) on all 9 alert notifications; explicit lovelace view paths for deterministic links. https://projects.knownelement.com/issues/344 --- automations.yaml | 18 ++++++++++++++++++ dashboards/server-room.yaml | 3 +++ 2 files changed, 21 insertions(+) diff --git a/automations.yaml b/automations.yaml index d4ed53d..89139d5 100644 --- a/automations.yaml +++ b/automations.yaml @@ -16,6 +16,8 @@ - notify.allthes_ipad data: title: POWER OUTAGE + clickAction: /lovelace-pfv-server-room/ups + url: /lovelace-pfv-server-room/ups message: '{{ state_attr(trigger.entity_id, ''friendly_name'') }} lost utility power and is ON BATTERY at {{ states(''sensor.'' ~ trigger.entity_id.split(''.'')[1] | replace(''_status'', ''_battery_charge'')) }}% charge.' @@ -39,6 +41,8 @@ - notify.allthes_ipad data: title: UPS BATTERY LOW + clickAction: /lovelace-pfv-server-room/ups + url: /lovelace-pfv-server-room/ups message: '{{ trigger.entity_id }} at {{ states(trigger.entity_id) }}% while on battery. Start graceful shutdown of VMs before hypervisors (#455 ordering).' mode: single @@ -59,6 +63,8 @@ - notify.allthes_ipad data: title: UPS COMMS LOST + clickAction: /lovelace-pfv-server-room/ups + url: /lovelace-pfv-server-room/ups message: '{{ trigger.entity_id }} unreachable for 5 minutes (nut-server or network path down; tsys1 also hosts pfv-bms itself).' mode: single @@ -81,6 +87,8 @@ - notify.allthes_ipad data: title: UPS RUNTIME LOW + clickAction: /lovelace-pfv-server-room/ups + url: /lovelace-pfv-server-room/ups message: On battery {{ states('sensor.pfv_ups_runtime_minutes') }} min left — start graceful shutdown now (#455 ordering). mode: single - id: pfv_plant_ups_power_restored @@ -102,6 +110,8 @@ - notify.allthes_ipad data: title: Power restored + clickAction: /lovelace-pfv-server-room/ups + url: /lovelace-pfv-server-room/ups message: '{{ state_attr(trigger.entity_id, ''friendly_name'') }} is back ONLINE.' mode: single - id: pfv_plant_high_temperature @@ -178,6 +188,8 @@ - notify.allthes_ipad data: title: HIGH TEMPERATURE + clickAction: /lovelace-pfv-server-room/temps + url: /lovelace-pfv-server-room/temps message: '{{ trigger.entity_id }} is {{ states(trigger.entity_id) }}°F (class threshold exceeded). Check cooling/airflow.' mode: single @@ -196,6 +208,8 @@ - notify.allthes_ipad data: title: SENSOR WATCHDOG + clickAction: /lovelace-pfv-server-room/overview + url: /lovelace-pfv-server-room/overview message: >- {% set fleet = states.sensor | selectattr('entity_id', 'match', 'sensor\.pfv_') | list %} @@ -228,6 +242,8 @@ - notify.allthes_ipad data: title: TEMP RISING FAST + clickAction: /lovelace-pfv-server-room/temps + url: /lovelace-pfv-server-room/temps message: '{{ trigger.entity_id }} climbing ~10F/15min — check cooling before the 104F threshold. (rate-of-change early warning)' # Deploy pipeline [#734]: gitea repo webhook (master pushes) -> forced pull @@ -502,6 +518,8 @@ - notify.allthes_ipad data: title: TEMPERATURE RECOVERED + clickAction: /lovelace-pfv-server-room/temps + url: /lovelace-pfv-server-room/temps message: >- {{ state_attr(trigger.entity_id, 'friendly_name') | default(trigger.entity_id) }} back to {{ states(trigger.entity_id) }}°F and holding — was diff --git a/dashboards/server-room.yaml b/dashboards/server-room.yaml index fe11cac..7d022dc 100644 --- a/dashboards/server-room.yaml +++ b/dashboards/server-room.yaml @@ -2,6 +2,7 @@ title: Server Room views: - title: Overview + path: overview type: sections sections: - type: grid @@ -59,6 +60,7 @@ views: hours_to_show: 24 - title: UPS + path: ups type: sections sections: - type: grid @@ -148,6 +150,7 @@ views: - binary_sensor.garage_temp_rising - title: Temps + path: temps type: sections sections: - type: grid