Add second office UPS telemetry

master
Carlo Costanzo 2 months ago
parent 5d42653316
commit cdb135ddce

@ -6,7 +6,7 @@
# Systems Partial - operations summary
# House-system health strip, active issues, and datacenter status.
# -------------------------------------------------------------------
# Related Issue: 1890, 1817, 1944
# Related Issue: 1890, 1817, 1936, 1944
# 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.
@ -823,6 +823,23 @@
action: navigate
navigation_path: /dashboard-infrastructure/ups
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_status
name: Office CyberPower ST Series
icon: mdi:battery-heart-variant
state_display: >
[[[
const charge = Number(states['sensor.office_ups_cyberpower_battery_charge']?.state);
const seconds = Number(states['sensor.office_ups_cyberpower_battery_runtime']?.state);
const battery = Number.isFinite(charge) ? `${charge.toFixed(0)}%` : 'NO BATTERY DATA';
const runtime = Number.isFinite(seconds) ? `${Math.floor(seconds / 60)}m` : 'NO RUNTIME';
return `${String(entity?.state ?? 'NO DATA').toUpperCase()} · ${battery} · ${runtime}`;
]]]
tap_action:
action: navigate
navigation_path: /dashboard-infrastructure/ups
- type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml

@ -4,7 +4,8 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Infrastructure Partial - UPS Power
# Garage and Office NUT status with current readings and trends.
# Related Issue: 1936
# Garage and both Office NUT devices with current readings and trends.
# -------------------------------------------------------------------
# Notes: Raw NUT status data drives the shared on-battery rollup.
# Notes: All graphs use 24-hour windows and explicit threshold colors.
@ -23,14 +24,14 @@
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(3, minmax(0, 1fr))
grid-template-columns: repeat(4, 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))
grid-template-columns: repeat(2, minmax(0, 1fr))
cards:
- type: custom:button-card
template: bearstone_nav_back
@ -62,6 +63,16 @@
healthy_text: ONLINE
alert_text: CHECK
- type: custom:button-card
template: bearstone_infra_status_kpi
entity: sensor.office_ups_cyberpower_status
name: Office CyberPower ST Series
icon: mdi:battery-heart-variant
variables:
ok_state: Online
healthy_text: ONLINE
alert_text: CHECK
- type: custom:button-card
template: bearstone_infra_status_kpi
entity: binary_sensor.infra_ups_on_battery
@ -85,7 +96,7 @@
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(2, minmax(0, 1fr))
grid-template-columns: repeat(3, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
@ -244,6 +255,81 @@
return Number.isFinite(value) ? `${value.toFixed(0)} V` : 'NO DATA';
]]]
- 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_icon
name: Office CyberPower ST Series
icon: mdi:battery-heart-variant
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_status
name: Status
icon: mdi:battery-heart-variant
state_display: >
[[[ return String(entity?.state ?? 'NO DATA').toUpperCase(); ]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_battery_charge
name: Battery
icon: mdi:battery-high
state_display: >
[[[
const value = Number(entity?.state);
return Number.isFinite(value) ? `${value.toFixed(0)}%` : 'NO DATA';
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_battery_runtime
name: Runtime
icon: mdi:timer-outline
state_display: >
[[[
const seconds = Number(entity?.state);
if (!Number.isFinite(seconds)) return 'NO DATA';
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
return hours > 0 ? `${hours}h ${minutes}m` : `${minutes}m`;
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_load
name: Load
icon: mdi:gauge
state_display: >
[[[
const value = Number(entity?.state);
return Number.isFinite(value) ? `${value.toFixed(0)}%` : 'NO DATA';
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_input_voltage
name: Input Voltage
icon: mdi:sine-wave
state_display: >
[[[
const value = Number(entity?.state);
return Number.isFinite(value) ? `${value.toFixed(0)} V` : 'NO DATA';
]]]
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.office_ups_cyberpower_output_voltage
name: Output Voltage
icon: mdi:flash-outline
state_display: >
[[[
const value = Number(entity?.state);
return Number.isFinite(value) ? `${value.toFixed(0)} V` : 'NO DATA';
]]]
# -------------------------------------------------------------------
# Battery and load trends
# -------------------------------------------------------------------
@ -257,7 +343,7 @@
columns: full
layout_type: custom:grid-layout
layout:
grid-template-columns: repeat(4, minmax(0, 1fr))
grid-template-columns: repeat(3, minmax(0, 1fr))
grid-auto-flow: row
grid-auto-rows: min-content
grid-gap: 12px
@ -320,6 +406,33 @@
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: custom:mini-graph-card
name: Office CyberPower Battery
icon: mdi:battery-high
hours_to_show: 24
points_per_hour: 2
line_width: 2
smoothing: true
height: 80
show:
legend: false
labels: false
name: true
icon: true
state: true
color_thresholds:
- value: 0
color: '#c0392b'
- value: 20
color: '#f39c12'
- value: 50
color: '#43a047'
entities:
- entity: sensor.office_ups_cyberpower_battery_charge
name: Battery
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: custom:mini-graph-card
name: Garage Load
icon: mdi:gauge
@ -374,6 +487,33 @@
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: custom:mini-graph-card
name: Office CyberPower Load
icon: mdi:gauge
hours_to_show: 24
points_per_hour: 2
line_width: 2
smoothing: true
height: 80
show:
legend: false
labels: false
name: true
icon: true
state: true
color_thresholds:
- value: 0
color: '#43a047'
- value: 60
color: '#f39c12'
- value: 85
color: '#c0392b'
entities:
- entity: sensor.office_ups_cyberpower_load
name: Load
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
# -------------------------------------------------------------------
# Home Assistant power resilience dry run
# -------------------------------------------------------------------

@ -4,9 +4,10 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Infrastructure View - UPS Power
# Related Issue: 1936
# Garage and Office backup-power status, capacity, and recent trends.
# -------------------------------------------------------------------
# Notes: The Office Eaton 3S 550 is served by the headless office-pi NUT host.
# Notes: Both Office UPS devices are served by the headless office-pi NUT host.
# Notes: All graphs use a consistent 24-hour window.
######################################################################

@ -4,6 +4,7 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Infrastructure - Observability, disk pressure, and Joanna review workflows
# Related Issue: 1936
# WAN/DNS/website/Docker host state normalized for dashboards, plus scheduled infrastructure reviews.
# Video: https://youtu.be/F-PpsKkzcrM
# Blog: https://www.vcloudinfo.com/2026/08/home-assistant-internet-speed-monitoring-ookla.html
@ -32,7 +33,7 @@
# Notes: Dashboard aggregate issue count includes compact BearClaw scheduled-job warning/error health.
# Notes: Docker host maintenance is counted separately from container runtime health so pending packages and stale host reports surface on Systems.
# Notes: Home Water rollup includes Rheem faults/telemetry loss plus active Phyn alerts and valve closure.
# Notes: UPS outage status aggregates the Garage and Office NUT servers from their raw status-data entities.
# Notes: UPS outage status aggregates the Garage plus both Office NUT devices from their raw status-data entities.
######################################################################
input_text:
@ -480,7 +481,8 @@ template:
state: >-
{% set statuses = [
states('sensor.garage_ups_status_data') | upper,
states('sensor.office_ups_eaton_550_status_data') | upper
states('sensor.office_ups_eaton_550_status_data') | upper,
states('sensor.office_ups_cyberpower_status_data') | upper
] %}
{% set ns = namespace(on_battery=false) %}
{% for status in statuses %}
@ -492,6 +494,7 @@ template:
attributes:
garage_status: "{{ states('sensor.garage_ups_status') }}"
office_status: "{{ states('sensor.office_ups_eaton_550_status') }}"
office_cyberpower_status: "{{ states('sensor.office_ups_cyberpower_status') }}"
- name: "Infra Website Degraded"
unique_id: infra_website_degraded

@ -8,6 +8,7 @@
# Related Issue: 1550
# Related Issue: 1571
# Related Issue: 1598
# Related Issue: 1936
# Powerwall status sensors, outage alerting, and load-shedding helpers.
# -------------------------------------------------------------------
# Video: https://youtu.be/hR_0lFEE2bA
@ -105,6 +106,7 @@ template:
preserve_threshold: "{{ 25 }}"
garage_ups_status: "{{ states('sensor.garage_ups_status') }}"
office_ups_status: "{{ states('sensor.office_ups_eaton_550_status') }}"
office_cyberpower_ups_status: "{{ states('sensor.office_ups_cyberpower_status') }}"
#-------------------------------------------
script:

Loading…
Cancel
Save

Powered by TurnKey Linux.