Enhance dashboard configurations by updating card styles to use `var(--divider-color)` for borders, improving consistency across various YAML files. Remove deprecated Pi-hole card section and streamline infrastructure views by including top chip sections for better organization. Update README to clarify Lovelace resource loading and migration notes.

pull/1581/head
Carlo Costanzo 2 months ago
parent ebe7c6f091
commit a9f1314026

@ -0,0 +1,58 @@
blueprint:
name: Motion-activated Light
description: Turn on a light when motion is detected.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
author: Home Assistant
input:
motion_entity:
name: Motion Sensor
selector:
entity:
filter:
- device_class: occupancy
domain: binary_sensor
- device_class: motion
domain: binary_sensor
light_target:
name: Light
selector:
target:
entity:
domain: light
no_motion_wait:
name: Wait time
description: Time to leave the light on after last motion is detected.
default: 120
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
# If motion is detected within the delay,
# we restart the script.
mode: restart
max_exceeded: silent
triggers:
trigger: state
entity_id: !input motion_entity
from: "off"
to: "on"
actions:
- alias: "Turn on the light"
action: light.turn_on
target: !input light_target
- alias: "Wait until there is no motion from device"
wait_for_trigger:
trigger: state
entity_id: !input motion_entity
from: "on"
to: "off"
- alias: "Wait the number of seconds that has been set"
delay: !input no_motion_wait
- alias: "Turn off the light"
action: light.turn_off
target: !input light_target

@ -0,0 +1,50 @@
blueprint:
name: Zone Notification
description: Send a notification to a device when a person leaves a specific zone.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
author: Home Assistant
input:
person_entity:
name: Person
selector:
entity:
filter:
domain: person
zone_entity:
name: Zone
selector:
entity:
filter:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
filter:
integration: mobile_app
triggers:
trigger: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
conditions:
condition: template
# The first case handles leaving the Home zone which has a special state when zoning called 'home'.
# The second case handles leaving all other zones.
value_template: "{{ zone_entity == 'zone.home' and trigger.from_state.state == 'home' and trigger.to_state.state != 'home' or trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
actions:
- alias: "Notify that a person has left the zone"
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has left {{ zone_state }}"

@ -0,0 +1,86 @@
blueprint:
name: Confirmable Notification
description: >-
A script that sends an actionable notification with a confirmation before
running the specified action.
domain: script
source_url: https://github.com/home-assistant/core/blob/master/homeassistant/components/script/blueprints/confirmable_notification.yaml
author: Home Assistant
input:
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
filter:
integration: mobile_app
title:
name: "Title"
description: "The title of the button shown in the notification."
default: ""
selector:
text:
message:
name: "Message"
description: "The message body"
selector:
text:
confirm_text:
name: "Confirmation Text"
description: "Text to show on the confirmation button"
default: "Confirm"
selector:
text:
confirm_action:
name: "Confirmation Action"
description: "Action to run when notification is confirmed"
default: []
selector:
action:
dismiss_text:
name: "Dismiss Text"
description: "Text to show on the dismiss button"
default: "Dismiss"
selector:
text:
dismiss_action:
name: "Dismiss Action"
description: "Action to run when notification is dismissed"
default: []
selector:
action:
mode: restart
sequence:
- alias: "Set up variables"
variables:
action_confirm: "{{ 'CONFIRM_' ~ context.id }}"
action_dismiss: "{{ 'DISMISS_' ~ context.id }}"
- alias: "Send notification"
domain: mobile_app
type: notify
device_id: !input notify_device
title: !input title
message: !input message
data:
actions:
- action: "{{ action_confirm }}"
title: !input confirm_text
- action: "{{ action_dismiss }}"
title: !input dismiss_text
- alias: "Awaiting response"
wait_for_trigger:
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_confirm }}"
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_dismiss }}"
- choose:
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
sequence: !input confirm_action
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
sequence: !input dismiss_action

@ -48,6 +48,9 @@ This folder is referenced from `config/configuration.yaml` via:
- `lovelace.resources: !include dashboards/resources.yaml` - `lovelace.resources: !include dashboards/resources.yaml`
- `lovelace.dashboards: ... filename: dashboards/<dashboard>/dashboard.yaml` - `lovelace.dashboards: ... filename: dashboards/<dashboard>/dashboard.yaml`
Lovelace resources are loaded from:
- `config/dashboards/resources.yaml` (referenced by `lovelace.resources`)
### Migration / Cutover Notes ### Migration / Cutover Notes
- During migration you may have both storage dashboards (from the UI) and YAML dashboards (from this folder) at the same time. - During migration you may have both storage dashboards (from the UI) and YAML dashboards (from this folder) at the same time.
- Do not try to create YAML dashboards with the same dashboard ID/key as an existing storage dashboard; remove/disable the storage version first in the UI. - Do not try to create YAML dashboards with the same dashboard ID/key as an existing storage dashboard; remove/disable the storage version first in the UI.

@ -12,6 +12,6 @@
| |
ha-card { ha-card {
border-radius: 18px; border-radius: 18px;
border: 1px solid rgba(0,0,0,0.06); border: 1px solid var(--divider-color);
box-shadow: none; box-shadow: none;
} }

@ -12,7 +12,7 @@
| |
ha-card { ha-card {
border-radius: 18px; border-radius: 18px;
border: 1px solid rgba(0,0,0,0.06); border: 1px solid var(--divider-color);
box-shadow: none; box-shadow: none;
padding: 12px; padding: 12px;
} }

@ -0,0 +1,31 @@
######################################################################
# @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 - Activity sections
# Activity feed wrapped in the standard Infrastructure layout.
# -------------------------------------------------------------------
# Notes: Uses Logbook card targeted at `sensor.activity_feed`.
######################################################################
- !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
- type: grid
column_span: 4
columns: 1
square: false
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: Activity Feed
- type: logbook
target:
entity_id:
- sensor.activity_feed
grid_options:
columns: full

@ -9,48 +9,26 @@
# Notes: Uses Portainer entities (`binary_sensor.*_status`, `button.*_restart_container`). # Notes: Uses Portainer entities (`binary_sensor.*_status`, `button.*_restart_container`).
###################################################################### ######################################################################
- type: grid - !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
column_span: 4
columns: 4
square: false
cards:
- type: custom:button-card
template: bearstone_infra_chip
entity: binary_sensor.node_proxmox1_updates_packages
name: Proxmox01
icon: mdi:server
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card
template: bearstone_infra_chip
entity: binary_sensor.node_proxmox02_updates_packages
name: Proxmox02
icon: mdi:server
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card
template: bearstone_infra_chip
entity: sensor.garage_ups_status
name: Garage UPS
icon: mdi:transmission-tower
- type: custom:button-card
template: bearstone_infra_chip
entity: sensor.vcloudinfo_com
name: vCloudinfo
icon: mdi:microsoft-internet-explorer
- type: grid - type: grid
column_span: 4 column_span: 4
columns: 1 columns: 1
square: false square: false
cards: 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: Docker Containers
- type: custom:auto-entities - type: custom:auto-entities
show_empty: true show_empty: true
grid_options: grid_options:
columns: full columns: full
card: card:
type: grid type: grid
title: Docker Containers
columns: 4 columns: 4
square: false square: false
card_param: cards card_param: cards
@ -60,23 +38,3 @@
- state: unavailable - state: unavailable
sort: sort:
method: name method: name
- type: grid
column_span: 4
columns: 1
square: false
cards:
- type: markdown
grid_options:
columns: full
content: |-
**Tip:** Hold a container row to restart it (confirmation required).
card_mod:
style: |
ha-card {
background: transparent;
border: none;
box-shadow: none;
text-align: center;
color: var(--secondary-text-color);
}

@ -9,45 +9,48 @@
# Notes: Standardized on `custom:button-card` + `custom:mini-graph-card` with `card_mod` polish. # Notes: Standardized on `custom:button-card` + `custom:mini-graph-card` with `card_mod` polish.
###################################################################### ######################################################################
- !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
- type: grid - type: grid
column_span: 4 column_span: 4
columns: 4 columns: 4
square: false square: false
cards: cards:
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: binary_sensor.node_proxmox1_updates_packages entity: sensor.total_wifi_clients
name: Proxmox01 name: Wi-Fi Clients
icon: mdi:server icon: mdi:wifi
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: binary_sensor.node_proxmox02_updates_packages entity: sensor.garage_ups_load
name: Proxmox02 name: UPS Load
icon: mdi:server icon: mdi:battery-charging-60
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: sensor.garage_ups_status entity: sensor.carlo_nvr_volume_1_volume_used
name: Garage UPS name: NVR Used
icon: mdi:transmission-tower icon: mdi:harddisk
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: sensor.vcloudinfo_com entity: sensor.carlo_nas01_volume_1_volume_used
name: vCloudinfo name: NAS Used
icon: mdi:microsoft-internet-explorer icon: mdi:nas
- type: grid - type: grid
column_span: 3 column_span: 3
columns: 2 columns: 3
square: false square: false
cards: cards:
- type: vertical-stack - type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards: cards:
- type: custom:mini-graph-card - type: custom:button-card
template: bearstone_infra_panel_header
name: Proxmox01 name: Proxmox01
- type: custom:mini-graph-card
name: CPU / Memory
icon: mdi:server icon: mdi:server
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -55,7 +58,7 @@
animate: true animate: true
show: show:
fill: true fill: true
legend: true legend: false
icon: true icon: true
name: true name: true
state: true state: true
@ -64,8 +67,6 @@
name: CPU name: CPU
- entity: sensor.node_proxmox1_memory_used_percentage - entity: sensor.node_proxmox1_memory_used_percentage
name: Memory name: Memory
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid - type: grid
columns: 3 columns: 3
square: false square: false
@ -101,10 +102,15 @@
button_entity: button.qemu_wireguard_104_reboot button_entity: button.qemu_wireguard_104_reboot
name: WireGuard name: WireGuard
- type: vertical-stack - type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards: cards:
- type: custom:mini-graph-card - type: custom:button-card
template: bearstone_infra_panel_header
name: Proxmox02 name: Proxmox02
- type: custom:mini-graph-card
name: CPU / Memory
icon: mdi:server icon: mdi:server
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -112,7 +118,7 @@
animate: true animate: true
show: show:
fill: true fill: true
legend: true legend: false
icon: true icon: true
name: true name: true
state: true state: true
@ -121,10 +127,8 @@
name: CPU name: CPU
- entity: sensor.node_proxmox02_memory_used_percentage - entity: sensor.node_proxmox02_memory_used_percentage
name: Memory name: Memory
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid - type: grid
columns: 3 columns: 1
square: false square: false
cards: cards:
- type: custom:button-card - type: custom:button-card
@ -138,9 +142,21 @@
button_entity: button.qemu_docker2_101_reboot button_entity: button.qemu_docker2_101_reboot
name: Frigate name: Frigate
- 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: Pi-hole
- type: custom:pi-hole
device_id: d69637da16f7d7f3626070582be59808
grid_options:
columns: full
- type: grid - type: grid
column_span: 1 column_span: 4
columns: 1 columns: 4
square: false square: false
cards: cards:
- type: custom:mini-graph-card - type: custom:mini-graph-card
@ -186,22 +202,37 @@
graph: line graph: line
card_mod: card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid
column_span: 2
columns: 2
square: true
cards:
- type: custom:flex-horseshoe-card - type: custom:flex-horseshoe-card
entities: entities:
- entity: sensor.carlo_nvr_volume_1_volume_used - entity: sensor.carlo_nvr_volume_1_volume_used
name: NVR Video name: NVR Used
decimals: 1 decimals: 1
unit: '%' unit: '%'
- entity: sensor.carlo_nvr_volume_1_total_size - entity: sensor.carlo_nvr_volume_1_total_size
name: Total name: Total
decimals: 2 decimals: 2
unit: TiB unit: TiB
layout:
names:
- entity_index: 0
xpos: 50
ypos: 22
styles:
- font-size: 0.9em;
- opacity: 0.75;
states:
- entity_index: 0
xpos: 50
ypos: 54
styles:
- font-size: 2.2em;
- font-weight: 800;
- entity_index: 1
xpos: 50
ypos: 76
styles:
- font-size: 0.95em;
- opacity: 0.75;
show: show:
horseshoe_style: colorstopgradient horseshoe_style: colorstopgradient
horseshoe_scale: horseshoe_scale:
@ -216,13 +247,34 @@
- type: custom:flex-horseshoe-card - type: custom:flex-horseshoe-card
entities: entities:
- entity: sensor.carlo_nas01_volume_1_volume_used - entity: sensor.carlo_nas01_volume_1_volume_used
name: NAS Storage name: NAS Used
decimals: 1 decimals: 1
unit: '%' unit: '%'
- entity: sensor.carlo_nas01_volume_1_total_size - entity: sensor.carlo_nas01_volume_1_total_size
name: Total name: Total
decimals: 2 decimals: 2
unit: TiB unit: TiB
layout:
names:
- entity_index: 0
xpos: 50
ypos: 22
styles:
- font-size: 0.9em;
- opacity: 0.75;
states:
- entity_index: 0
xpos: 50
ypos: 54
styles:
- font-size: 2.2em;
- font-weight: 800;
- entity_index: 1
xpos: 50
ypos: 76
styles:
- font-size: 0.95em;
- opacity: 0.75;
show: show:
horseshoe_style: colorstopgradient horseshoe_style: colorstopgradient
horseshoe_scale: horseshoe_scale:
@ -236,12 +288,19 @@
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid - type: grid
column_span: 2 column_span: 4
columns: 1 columns: 2
square: false square: false
cards: cards:
- type: custom:mini-graph-card - 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: Wi-Fi Overview name: Wi-Fi Overview
- type: custom:mini-graph-card
name: Clients
icon: mdi:wifi icon: mdi:wifi
hours_to_show: 24 hours_to_show: 24
line_width: 2 line_width: 2
@ -249,7 +308,7 @@
smoothing: true smoothing: true
show: show:
graph: line graph: line
legend: true legend: false
labels: false labels: false
name: true name: true
icon: true icon: true
@ -272,11 +331,7 @@
- entity: sensor.unifi_ap_garage_clients - entity: sensor.unifi_ap_garage_clients
name: Garage AP name: Garage AP
show_state: true show_state: true
card_mod: - type: grid
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid
column_span: 4
columns: 3 columns: 3
square: false square: false
cards: cards:
@ -311,8 +366,14 @@
button_entity: button.unifi_ap_study_restart button_entity: button.unifi_ap_study_restart
name: Study AP name: Study AP
- type: grid - type: custom:vertical-stack-in-card
column_span: 4 card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: APT Status
- type: grid
columns: 3 columns: 3
square: false square: false
cards: cards:

@ -0,0 +1,41 @@
######################################################################
# @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 - Top status chips (shared)
# Common "chips row" used across Infrastructure views.
# -------------------------------------------------------------------
# Notes: Keep this lightweight; it should render fast on every view.
######################################################################
type: grid
column_span: 4
columns: 4
square: false
cards:
- type: custom:button-card
template: bearstone_infra_chip
entity: binary_sensor.node_proxmox1_updates_packages
name: Proxmox01
icon: mdi:server
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card
template: bearstone_infra_chip
entity: binary_sensor.node_proxmox02_updates_packages
name: Proxmox02
icon: mdi:server
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card
template: bearstone_infra_chip
entity: sensor.garage_ups_status
name: Garage UPS
icon: mdi:transmission-tower
- type: custom:button-card
template: bearstone_infra_chip
entity: sensor.vcloudinfo_com
name: vCloudinfo
icon: mdi:microsoft-internet-explorer

@ -6,10 +6,41 @@
# Infrastructure Partial - mariadb sections # Infrastructure Partial - mariadb sections
# Reusable list extracted from a view for smaller diffs and safer edits. # Reusable list extracted from a view for smaller diffs and safer edits.
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Stitch-inspired MariaDB layout (3 panel columns). # Notes: Stitch-inspired MariaDB layout (KPI strip + 3 panel columns).
###################################################################### ######################################################################
- column_span: 1 - !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
- type: grid
column_span: 4
columns: 4
square: false
cards:
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.database_size
name: DB Size
icon: mdi:database
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.database_tables_count
name: Tables
icon: mdi:table
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.mariadb_connections
name: Conn.
icon: mdi:lan-connect
- type: custom:button-card
template: bearstone_infra_kpi
entity: sensor.mariadb_uptime
name: Uptime
icon: mdi:timer-outline
- type: grid
column_span: 4
columns: 3
square: false
cards: cards:
- type: custom:vertical-stack-in-card - type: custom:vertical-stack-in-card
card_mod: card_mod:
@ -18,16 +49,6 @@
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_panel_header template: bearstone_infra_panel_header
name: Database Statistics name: Database Statistics
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.database_size
name: Database Size
icon: mdi:database
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.database_tables_count
name: Number of Tables
icon: mdi:table
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_list_row template: bearstone_infra_list_row
entity: sensor.database_total_records entity: sensor.database_total_records
@ -44,8 +65,6 @@
name: Oldest Record name: Oldest Record
icon: mdi:clock-start icon: mdi:clock-start
- column_span: 1
cards:
- type: custom:vertical-stack-in-card - type: custom:vertical-stack-in-card
card_mod: card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
@ -73,24 +92,12 @@
entity: sensor.mariadb_performance entity: sensor.mariadb_performance
name: Performance name: Performance
icon: mdi:chart-line icon: mdi:chart-line
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.mariadb_uptime
name: Uptime
icon: mdi:timer-outline
- type: custom:button-card
template: bearstone_infra_list_row
entity: sensor.mariadb_connections
name: Active Connections
icon: mdi:lan-connect
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_list_row template: bearstone_infra_list_row
entity: sensor.mariadb_questions entity: sensor.mariadb_questions
name: Total Queries name: Total Queries
icon: mdi:database-search icon: mdi:database-search
- column_span: 1
cards:
- type: custom:vertical-stack-in-card - type: custom:vertical-stack-in-card
card_mod: card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml

@ -9,45 +9,48 @@
# Notes: Standardized on `custom:button-card` + `custom:mini-graph-card` with `card_mod` polish. # Notes: Standardized on `custom:button-card` + `custom:mini-graph-card` with `card_mod` polish.
###################################################################### ######################################################################
- !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
- type: grid - type: grid
column_span: 4 column_span: 4
columns: 4 columns: 4
square: false square: false
cards: cards:
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: binary_sensor.node_proxmox1_updates_packages entity: sensor.node_proxmox1_cpu_used
name: Proxmox01 name: P1 CPU
icon: mdi:server icon: mdi:cpu-64-bit
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: binary_sensor.node_proxmox02_updates_packages entity: sensor.node_proxmox1_memory_used_percentage
name: Proxmox02 name: P1 MEM
icon: mdi:server icon: mdi:memory
state_display: >
[[[ return entity.state === 'on' ? 'Updates pending' : 'Up to date'; ]]]
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: sensor.garage_ups_status entity: sensor.node_proxmox02_cpu_used
name: Garage UPS name: P2 CPU
icon: mdi:transmission-tower icon: mdi:cpu-64-bit
- type: custom:button-card - type: custom:button-card
template: bearstone_infra_chip template: bearstone_infra_kpi
entity: sensor.vcloudinfo_com entity: sensor.node_proxmox02_memory_used_percentage
name: vCloudinfo name: P2 MEM
icon: mdi:microsoft-internet-explorer icon: mdi:memory
- type: grid - type: grid
column_span: 4 column_span: 4
columns: 2 columns: 2
square: false square: false
cards: cards:
- type: vertical-stack - type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards: cards:
- type: custom:mini-graph-card - type: custom:button-card
template: bearstone_infra_panel_header
name: Proxmox01 name: Proxmox01
- type: custom:mini-graph-card
name: Host CPU / Memory
icon: mdi:server icon: mdi:server
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -55,7 +58,7 @@
animate: true animate: true
show: show:
fill: true fill: true
legend: true legend: false
icon: true icon: true
name: true name: true
state: true state: true
@ -64,10 +67,8 @@
name: CPU name: CPU
- entity: sensor.node_proxmox1_memory_used_percentage - entity: sensor.node_proxmox1_memory_used_percentage
name: Memory name: Memory
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: custom:mini-graph-card - type: custom:mini-graph-card
name: Proxmox01 VMs (CPU / MEM) name: VMs CPU / Memory
icon: mdi:chart-line icon: mdi:chart-line
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -75,7 +76,7 @@
animate: true animate: true
show: show:
fill: false fill: false
legend: true legend: false
icon: true icon: true
name: true name: true
state: false state: false
@ -92,8 +93,6 @@
name: WireGuard CPU name: WireGuard CPU
- entity: sensor.qemu_wireguard_104_memory_used_percentage - entity: sensor.qemu_wireguard_104_memory_used_percentage
name: WireGuard MEM name: WireGuard MEM
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid - type: grid
columns: 3 columns: 3
square: false square: false
@ -129,10 +128,15 @@
button_entity: button.qemu_wireguard_104_reboot button_entity: button.qemu_wireguard_104_reboot
name: WireGuard name: WireGuard
- type: vertical-stack - type: custom:vertical-stack-in-card
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards: cards:
- type: custom:mini-graph-card - type: custom:button-card
template: bearstone_infra_panel_header
name: Proxmox02 name: Proxmox02
- type: custom:mini-graph-card
name: Host CPU / Memory
icon: mdi:server icon: mdi:server
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -140,7 +144,7 @@
animate: true animate: true
show: show:
fill: true fill: true
legend: true legend: false
icon: true icon: true
name: true name: true
state: true state: true
@ -149,10 +153,8 @@
name: CPU name: CPU
- entity: sensor.node_proxmox02_memory_used_percentage - entity: sensor.node_proxmox02_memory_used_percentage
name: Memory name: Memory
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: custom:mini-graph-card - type: custom:mini-graph-card
name: Frigate VM (CPU / MEM) name: Frigate VM CPU / Memory
icon: mdi:video icon: mdi:video
hours_to_show: 24 hours_to_show: 24
points_per_hour: 2 points_per_hour: 2
@ -160,7 +162,7 @@
animate: true animate: true
show: show:
fill: false fill: false
legend: true legend: false
icon: true icon: true
name: true name: true
state: false state: false
@ -169,8 +171,6 @@
name: CPU name: CPU
- entity: sensor.qemu_docker2_101_memory_used_percentage - entity: sensor.qemu_docker2_101_memory_used_percentage
name: MEM name: MEM
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_card.yaml
- type: grid - type: grid
columns: 3 columns: 3
square: false square: false

@ -6,43 +6,66 @@
# Infrastructure Partial - vacuum sections # Infrastructure Partial - vacuum sections
# Reusable list extracted from a view for smaller diffs and safer edits. # Reusable list extracted from a view for smaller diffs and safer edits.
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Extracted from config/dashboards/infrastructure/views/03_vacuum.yaml key `sections`. # Notes: Extracted from config/dashboards/infrastructure/views/04_vacuum.yaml key `sections`.
###################################################################### ######################################################################
- !include /config/dashboards/infrastructure/partials/infra_top_chips_section.yaml
- type: grid - type: grid
column_span: 4
columns: 4
square: false
cards: cards:
- type: tile - type: custom:vertical-stack-in-card
entity: input_text.l10s_vacuum_room_catalog
vertical: false
features_position: bottom
grid_options: grid_options:
columns: full columns: 2
card_mod:
style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Vacuum
- type: custom:button-card
template: bearstone_infra_list_row
entity: vacuum.l10s_vacuum
name: L10s
icon: mdi:robot-vacuum
state_display: >
[[[ return String(entity.state || 'unknown').toUpperCase(); ]]]
- type: tile - type: tile
entity: input_text.l10s_vacuum_room_queue entity: input_select.l10s_vacuum_phase
vertical: false vertical: false
features_position: bottom features_position: bottom
grid_options: - type: custom:button-card
columns: full template: bearstone_infra_list_row
- type: tile entity: sensor.l10s_vacuum_current_room
name: Current Room
icon: mdi:map-marker
- type: custom:button-card
template: bearstone_infra_list_row
entity: input_text.l10s_vacuum_rooms_cleaned_today entity: input_text.l10s_vacuum_rooms_cleaned_today
vertical: false name: Rooms Cleaned (Today)
features_position: bottom icon: mdi:check-circle-outline
grid_options: - type: custom:button-card
columns: full template: bearstone_infra_list_row
- type: tile entity: input_text.l10s_vacuum_room_queue
name: Room Queue
icon: mdi:format-list-bulleted
- type: custom:button-card
template: bearstone_infra_list_row
entity: input_text.l10s_vacuum_room_catalog
name: Room Catalog
icon: mdi:book-open-variant
- type: custom:vertical-stack-in-card
grid_options: grid_options:
columns: full columns: 2
entity: sensor.l10s_vacuum_current_room card_mod:
state_content: style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml
- state
- room_id
- last_changed
vertical: false
features_position: bottom
- type: tile
entity: input_select.l10s_vacuum_phase
- type: grid
cards: cards:
- type: custom:button-card
template: bearstone_infra_panel_header
name: Map
- type: custom:xiaomi-vacuum-map-card - type: custom:xiaomi-vacuum-map-card
map_source: map_source:
camera: camera.l10s_vacuum_map camera: camera.l10s_vacuum_map

@ -21,7 +21,7 @@ bearstone_infra_base:
- padding: 14px - padding: 14px
- box-shadow: none - box-shadow: none
- background: var(--ha-card-background, var(--card-background-color)) - background: var(--ha-card-background, var(--card-background-color))
- border: 1px solid rgba(0,0,0,0.06) - border: 1px solid var(--divider-color)
- overflow: hidden - overflow: hidden
grid: grid:
- grid-template-areas: "\"i n\" \"i s\"" - grid-template-areas: "\"i n\" \"i s\""
@ -47,10 +47,8 @@ bearstone_infra_chip:
card: card:
- border-radius: 999px - border-radius: 999px
- padding: 10px 12px - padding: 10px 12px
- border: 1px solid rgba(0,0,0,0.06) - border: 1px solid var(--divider-color)
- background: rgba(255,255,255,0.75) - background: var(--ha-card-background, var(--card-background-color))
- backdrop-filter: blur(6px)
- -webkit-backdrop-filter: blur(6px)
grid: grid:
- grid-template-areas: "\"i n\" \"i s\"" - grid-template-areas: "\"i n\" \"i s\""
- grid-template-columns: 28px 1fr - grid-template-columns: 28px 1fr
@ -139,8 +137,9 @@ bearstone_infra_device_tile:
- font-weight: 700 - font-weight: 700
bearstone_infra_container_row: bearstone_infra_container_row:
template: bearstone_infra_list_row_running template: bearstone_infra_list_row
show_label: false show_label: false
show_state: false
tap_action: tap_action:
action: none action: none
hold_action: hold_action:
@ -151,6 +150,117 @@ bearstone_infra_container_row:
confirmation: confirmation:
text: '[[[ return "Restart container " + entity.attributes.friendly_name + "?" ]]]' text: '[[[ return "Restart container " + entity.attributes.friendly_name + "?" ]]]'
icon: mdi:docker icon: mdi:docker
custom_fields:
status: >
[[[
const s = String(entity.state || '').toLowerCase();
if (s === 'on' || s === 'running') return 'RUNNING';
if (s === 'off' || s === 'stopped') return 'STOPPED';
if (s === 'unavailable') return 'OFFLINE';
if (s === 'unknown' || s === '') return 'UNKNOWN';
return String(entity.state).toUpperCase();
]]]
styles:
grid:
- grid-template-areas: "\"i n status\""
- grid-template-columns: 24px 1fr auto
- align-items: center
- column-gap: 12px
name:
- min-width: 0
- overflow: hidden
- text-overflow: ellipsis
- white-space: nowrap
custom_fields:
status:
- justify-self: end
- align-self: center
- font-weight: 900
- font-size: 12px
- letter-spacing: 0.04em
- padding: 4px 10px
- border-radius: 999px
- background: rgba(0,0,0,0.06)
- color: var(--secondary-text-color)
- line-height: 1.1
state:
- value: 'on'
styles:
card:
- border-color: rgba(67,160,71,0.45)
- background: rgba(232,245,233,0.85)
icon:
- color: rgba(46,125,50,1)
custom_fields:
status:
- background: rgba(46,125,50,0.12)
- color: rgba(46,125,50,1)
- value: 'off'
styles:
card:
- border-color: rgba(229,57,53,0.35)
- background: rgba(255,235,238,0.85)
icon:
- color: rgba(198,40,40,1)
custom_fields:
status:
- background: rgba(198,40,40,0.10)
- color: rgba(198,40,40,1)
- value: Running
styles:
card:
- border-color: rgba(67,160,71,0.45)
- background: rgba(232,245,233,0.85)
icon:
- color: rgba(46,125,50,1)
custom_fields:
status:
- background: rgba(46,125,50,0.12)
- color: rgba(46,125,50,1)
- value: running
styles:
card:
- border-color: rgba(67,160,71,0.45)
- background: rgba(232,245,233,0.85)
icon:
- color: rgba(46,125,50,1)
custom_fields:
status:
- background: rgba(46,125,50,0.12)
- color: rgba(46,125,50,1)
- value: Stopped
styles:
card:
- border-color: rgba(229,57,53,0.35)
- background: rgba(255,235,238,0.85)
icon:
- color: rgba(198,40,40,1)
custom_fields:
status:
- background: rgba(198,40,40,0.10)
- color: rgba(198,40,40,1)
- value: stopped
styles:
card:
- border-color: rgba(229,57,53,0.35)
- background: rgba(255,235,238,0.85)
icon:
- color: rgba(198,40,40,1)
custom_fields:
status:
- background: rgba(198,40,40,0.10)
- color: rgba(198,40,40,1)
- value: unavailable
styles:
card:
- border-color: rgba(229,57,53,0.35)
- background: rgba(255,235,238,0.85)
icon:
- color: rgba(198,40,40,1)
custom_fields:
status:
- background: rgba(198,40,40,0.10)
- color: rgba(198,40,40,1)
bearstone_infra_panel_header: bearstone_infra_panel_header:
show_icon: false show_icon: false
@ -167,6 +277,8 @@ bearstone_infra_panel_header:
name: name:
- font-size: 18px - font-size: 18px
- font-weight: 800 - font-weight: 800
- letter-spacing: 0.04em
- text-transform: uppercase
- justify-self: start - justify-self: start
bearstone_infra_list_row: bearstone_infra_list_row:

@ -13,6 +13,7 @@ title: Infrastructure
path: home path: home
type: sections type: sections
icon: mdi:view-dashboard-variant icon: mdi:view-dashboard-variant
theme: default
max_columns: 4 max_columns: 4
badges: [] badges: []
sections: !include /config/dashboards/infrastructure/partials/home_sections.yaml sections: !include /config/dashboards/infrastructure/partials/home_sections.yaml

@ -14,6 +14,7 @@ path: proxmox
cards: [] cards: []
type: sections type: sections
icon: mdi:server icon: mdi:server
theme: default
badges: [] badges: []
sections: !include /config/dashboards/infrastructure/partials/proxmox_sections.yaml sections: !include /config/dashboards/infrastructure/partials/proxmox_sections.yaml
max_columns: 4 max_columns: 4

@ -11,6 +11,7 @@
title: Vacuum title: Vacuum
icon: mdi:robot-vacuum icon: mdi:robot-vacuum
theme: default
type: sections type: sections
cards: [] cards: []
visible: visible:
@ -19,5 +20,5 @@ visible:
- user: 8fc5ba22cb32430a9143beb4df70541b - user: 8fc5ba22cb32430a9143beb4df70541b
- user: 19970706e7e4492c844ea2fc94a4599a - user: 19970706e7e4492c844ea2fc94a4599a
sections: !include /config/dashboards/infrastructure/partials/vacuum_sections.yaml sections: !include /config/dashboards/infrastructure/partials/vacuum_sections.yaml
max_columns: 2 max_columns: 4
badges: !include /config/dashboards/infrastructure/partials/vacuum_badges.yaml badges: !include /config/dashboards/infrastructure/partials/vacuum_badges.yaml

@ -9,8 +9,12 @@
# Notes: Exported from config/.storage/lovelace.dashboard_infrastructure view index 4. # Notes: Exported from config/.storage/lovelace.dashboard_infrastructure view index 4.
###################################################################### ######################################################################
type: panel
icon: mdi:clipboard-text-outline icon: mdi:clipboard-text-outline
title: Activity title: Activity
path: activity path: activity
cards: !include /config/dashboards/infrastructure/partials/view_cards.yaml type: sections
theme: default
max_columns: 4
badges: []
cards: []
sections: !include /config/dashboards/infrastructure/partials/activity_sections.yaml

@ -12,7 +12,9 @@
type: sections type: sections
title: MariaDB title: MariaDB
path: mariadb path: mariadb
max_columns: 3 max_columns: 4
icon: mdi:database icon: mdi:database
theme: default
badges: []
sections: !include /config/dashboards/infrastructure/partials/mariadb_sections.yaml sections: !include /config/dashboards/infrastructure/partials/mariadb_sections.yaml
cards: [] cards: []

@ -13,6 +13,7 @@ title: Docker
path: docker path: docker
type: sections type: sections
icon: mdi:docker icon: mdi:docker
theme: default
badges: [] badges: []
sections: !include /config/dashboards/infrastructure/partials/docker_containers_sections.yaml sections: !include /config/dashboards/infrastructure/partials/docker_containers_sections.yaml
max_columns: 4 max_columns: 4

@ -6,7 +6,7 @@
# Overview Dashboard - YAML entrypoint # Overview Dashboard - YAML entrypoint
# YAML-exported Lovelace dashboard (split into view files). # YAML-exported Lovelace dashboard (split into view files).
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Entry point for dashboard key `lovelace`. Views are loaded from /config/dashboards/overview/views. # Notes: Used by `/config/ui-lovelace.yaml` (main Lovelace UI). Views are loaded from /config/dashboards/overview/views.
###################################################################### ######################################################################
title: Bear Stone title: Bear Stone

@ -7,6 +7,7 @@
# YAML-managed Lovelace resources (resource_mode: yaml). # YAML-managed Lovelace resources (resource_mode: yaml).
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Generated from config/.storage/lovelace_resources. Edit here after migration; do not edit .storage. # Notes: Generated from config/.storage/lovelace_resources. Edit here after migration; do not edit .storage.
# Loaded by Home Assistant via `config/lovelace/resources.yaml`.
###################################################################### ######################################################################
- type: module - type: module

@ -3,13 +3,11 @@
# For more info visit https://www.vcloudinfo.com/click-here # For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Infrastructure Partial - pi_hole cards # Lovelace Resources - Custom card JS resources
# Reusable list extracted from a view for smaller diffs and safer edits. # YAML-managed Lovelace resources (resource_mode: yaml).
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Extracted from config/dashboards/infrastructure/views/02_pi_hole.yaml key `cards`. # Notes: This file is NOT used in this repo's wiring.
# Resources are loaded via `lovelace.resources: !include dashboards/resources.yaml` in `configuration.yaml`.
###################################################################### ######################################################################
- type: custom:pi-hole # (Intentionally empty)
device_id: d69637da16f7d7f3626070582be59808
grid_options:
columns: full

@ -3,16 +3,10 @@
# For more info visit https://www.vcloudinfo.com/click-here # For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Infrastructure View - Pi-Hole # Lovelace UI - Overview dashboard (YAML mode)
# YAML-exported Lovelace dashboard (split into view files). # Main Lovelace UI entrypoint (defined as a YAML dashboard in `configuration.yaml`).
# ------------------------------------------------------------------- # -------------------------------------------------------------------
# Notes: Exported from config/.storage/lovelace.dashboard_infrastructure view index 2. # Notes: Delegates to `/config/dashboards/overview/dashboard.yaml`.
###################################################################### ######################################################################
type: panel !include /config/dashboards/overview/dashboard.yaml
path: pi-hole
title: Pi-Hole
icon: mdi:pi-hole
visible:
- user: be280a93c9d7416e98d25d0470f414be
cards: !include /config/dashboards/infrastructure/partials/pi_hole_cards.yaml

@ -0,0 +1,69 @@
param(
[string]$BaseUrl = $env:HASS_PLAYWRIGHT_BASE_URL
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
if ([string]::IsNullOrWhiteSpace($BaseUrl)) {
# Canonical LAN URL for agent automation (trusted_networks bypass).
$BaseUrl = 'http://192.168.10.10:8123'
}
$BaseUrl = $BaseUrl.TrimEnd('/')
function Get-EffectiveUrlAndStatus {
param(
[Parameter(Mandatory = $true)]
[string]$Url
)
# Use curl.exe (not Invoke-WebRequest alias) so we can reliably see redirects.
$curl = (Get-Command curl.exe -ErrorAction Stop).Source
# Follow redirects; return final URL + status code.
$out = & $curl -sS -L -o NUL -w "%{url_effective} %{http_code}" $Url 2>$null
if (-not $out) { throw "curl produced no output for $Url" }
$parts = $out -split ' '
if ($parts.Count -lt 2) { throw "Unexpected curl output: $out" }
[pscustomobject]@{
EffectiveUrl = $parts[0]
StatusCode = [int]$parts[1]
}
}
$targets = @(
'/',
'/profile',
'/dashboard-infrastructure',
'/dashboard-infrastructure/docker',
'/dashboard-infrastructure/mariadb',
'/dashboard-kiosk'
)
$failed = $false
foreach ($path in $targets) {
$url = "$BaseUrl$path"
$r = Get-EffectiveUrlAndStatus -Url $url
$isLogin = $r.EffectiveUrl -match '/(login|auth/authorize)\b'
$statusOk = $r.StatusCode -ge 200 -and $r.StatusCode -lt 400
if ($isLogin -or -not $statusOk) {
$failed = $true
Write-Host ("FAIL {0} -> {1} ({2})" -f $url, $r.EffectiveUrl, $r.StatusCode)
} else {
Write-Host ("OK {0} -> {1} ({2})" -f $url, $r.EffectiveUrl, $r.StatusCode)
}
}
if ($failed) {
Write-Host ''
Write-Host 'Likely causes:'
Write-Host '- Base URL is external (Cloudflared/Nabu Casa) instead of LAN.'
Write-Host '- Home Assistant does not see the request IP as trusted; check `homeassistant.auth_providers.trusted_networks`.'
exit 1
}
exit 0
Loading…
Cancel
Save

Powered by TurnKey Linux.