You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
5.3 KiB

######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Infrastructure Partial - Website health
# Current UptimeRobot availability, domain registration, and actionable exceptions.
# -------------------------------------------------------------------
# Notes: The installed UptimeRobot integration exposes current monitor state, not Kuma-style rollups.
######################################################################
# -------------------------------------------------------------------
# Current health and domain registration (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(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: Current Website Health
- type: custom:button-card
template: bearstone_infra_list_row_running
entity: binary_sensor.vcloudinfo_com
name: vcloudinfo.com
icon: mdi:web
state_display: '[[[ return entity.state === "on" ? "UP" : String(entity.state || "unknown").toUpperCase(); ]]]'
- type: custom:button-card
template: bearstone_infra_list_row_running
entity: binary_sensor.www_kingcrafthomes_com
name: kingcrafthomes.com
icon: mdi:web
state_display: '[[[ return entity.state === "on" ? "UP" : String(entity.state || "unknown").toUpperCase(); ]]]'
- type: custom:button-card
template: bearstone_infra_list_row_running
entity: binary_sensor.bear_stone
name: Bear Stone
icon: mdi:web-check
state_display: '[[[ return entity.state === "on" ? "UP" : String(entity.state || "unknown").toUpperCase(); ]]]'
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.infra_website_down_count
name: Monitoring Coverage
icon: mdi:cloud-check-outline
state_display: >
[[[
const down = Number(entity?.state);
if (!Number.isFinite(down)) return 'NO DATA';
return `${3 - down}/3 CURRENT MONITORS UP`;
]]]
- 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: Domain Registration Expiration
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.vcloudinfo_com_days_until_expiration
name: vcloudinfo.com
icon: mdi:calendar-clock
state_display: '[[[ return `${entity.state} days`; ]]]'
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.ipmer_com_days_until_expiration
name: ipmer.com
icon: mdi:calendar-clock
state_display: '[[[ return `${entity.state} days`; ]]]'
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.kingcrafthomes_com_days_until_expiration
name: kingcrafthomes.com
icon: mdi:calendar-clock
state_display: '[[[ return `${entity.state} days`; ]]]'
# -------------------------------------------------------------------
# Actionable exceptions
# -------------------------------------------------------------------
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: custom:vertical-stack-in-card
grid_options:
columns: full
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Website Exceptions
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.infra_website_down_count
name: Current Availability Summary
icon: mdi:web-check
state_display: >
[[[
const count = Number(entity?.state);
if (!Number.isFinite(count)) return 'NO DATA';
return count === 0 ? 'ALL MONITORS UP' : `${count} MONITORS DOWN`;
]]]
- type: custom:button-card
template: bearstone_infra_alert_row
entity: binary_sensor.infra_website_degraded
name: Website availability degraded
icon: mdi:web-off
variables:
alert_kind: binary_on
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.infra_website_down_count
name: Telemetry Scope
icon: mdi:information-outline
state_display: '[[[ return "CURRENT UP/DOWN | UPTIMEROBOT"; ]]]'

Powered by TurnKey Linux.