diff --git a/config/dashboards/README.md b/config/dashboards/README.md index c7226bef..56251cd6 100644 --- a/config/dashboards/README.md +++ b/config/dashboards/README.md @@ -64,7 +64,7 @@ This folder holds YAML-managed Home Assistant Lovelace dashboards and UI resourc - Kitchen tablet view: [](kiosk_satellite_staging/views/01_home.yaml) - Automatic day/night theme: [](../themes/kiosk_satellite.yaml) -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. 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 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. +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. ### How it is wired into Home Assistant This folder is referenced from `config/configuration.yaml` via: diff --git a/config/dashboards/infrastructure/partials/docker_containers_sections.yaml b/config/dashboards/infrastructure/partials/docker_containers_sections.yaml index bac303f2..8666e40c 100644 --- a/config/dashboards/infrastructure/partials/docker_containers_sections.yaml +++ b/config/dashboards/infrastructure/partials/docker_containers_sections.yaml @@ -8,6 +8,7 @@ # ------------------------------------------------------------------- # Notes: Healthy stacks and containers live in the hidden Docker Inventory subview. # Notes: Host maintenance controls remain in the existing confirmed popups. +# Notes: Portainer `_2` entities are the live split-device telemetry; unsuffixed duplicates are unavailable. # Notes: Synology NAS/NVR temperatures stay with their storage telemetry, not household temperature cards. # Notes: Storage Health includes the persisted nightly Duplicati verification result and last successful backup time. ###################################################################### @@ -105,37 +106,135 @@ template: bearstone_infra_panel_header name: Host Updates - - type: custom:button-card - template: bearstone_infra_update_row - entity: sensor.docker_10_apt_status - name: docker_10 - tap_action: - action: navigate - navigation_path: '#infra-docker-10' + - type: grid + columns: 3 + square: false + cards: + - type: custom:button-card + template: bearstone_infra_update_tile + entity: sensor.docker_10_apt_status + name: docker_10 + tap_action: + action: navigate + navigation_path: '#infra-docker-10' - - type: custom:button-card - template: bearstone_infra_update_row - entity: sensor.docker_17_apt_status - name: docker_17 - tap_action: - action: navigate - navigation_path: '#infra-docker-17' + - type: custom:button-card + template: bearstone_infra_update_tile + entity: sensor.docker_13_apt_status + name: docker_13 + tap_action: + action: navigate + navigation_path: '#infra-docker-13' - - type: custom:button-card - template: bearstone_infra_update_row - entity: sensor.docker_69_apt_status - name: docker_69 - tap_action: - action: navigate - navigation_path: '#infra-docker-69' + - type: custom:button-card + template: bearstone_infra_update_tile + entity: sensor.docker_14_apt_status + name: docker_14 + tap_action: + action: navigate + navigation_path: '#infra-docker-14' + + - type: custom:button-card + template: bearstone_infra_update_tile + entity: sensor.docker_17_apt_status + name: docker_17 + tap_action: + action: navigate + navigation_path: '#infra-docker-17' + + - type: custom:button-card + template: bearstone_infra_update_tile + entity: sensor.docker_69_apt_status + name: docker_69 + tap_action: + action: navigate + navigation_path: '#infra-docker-69' + + - type: custom:button-card + template: bearstone_infra_update_tile + entity: input_text.infra_duplicati_backup_verification_status + name: Docker Config Backup + icon: mdi:backup-restore + variables: + apt_severity: > + [[[ + const status = String(entity?.state ?? 'unverified').toLowerCase(); + if (status === 'verified') return 'healthy'; + if (status === 'failed') return 'overdue'; + return 'scheduled'; + ]]] + state_display: > + [[[ + const status = String(entity?.state ?? 'unverified').toLowerCase(); + if (status === 'verified') return 'SUCCESS'; + if (status === 'failed') return 'FAILED'; + return 'UNVERIFIED'; + ]]] + label: > + [[[ + const raw = String(states['input_datetime.infra_duplicati_backup_last_success']?.state ?? ''); + const parsed = raw ? new Date(raw.replace(' ', 'T')) : null; + return parsed instanceof Date && !Number.isNaN(parsed.getTime()) + ? parsed.toLocaleString('en-US', { + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: '2-digit' + }).toUpperCase() + : 'NO SUCCESS TIME'; + ]]] - type: custom:button-card - template: bearstone_infra_update_row - entity: sensor.docker_14_apt_status - name: docker_14 - tap_action: - action: navigate - navigation_path: '#infra-docker-14' + template: bearstone_infra_panel_header + name: Portainer Telemetry + + - type: grid + columns: 3 + square: false + cards: + - type: custom:button-card + template: bearstone_infra_status_kpi + entity: binary_sensor.portainer_status_2 + name: Portainer + icon: mdi:docker + variables: + ok_state: 'on' + healthy_text: HEALTHY + raw_suffix: STATUS + + - type: custom:button-card + template: bearstone_infra_status_kpi + entity: binary_sensor.portainer_agent_status_2 + name: Portainer Agent + icon: mdi:lan-connect + variables: + ok_state: 'on' + healthy_text: HEALTHY + raw_suffix: STATUS + + - type: custom:button-card + template: bearstone_infra_kpi + entity: sensor.portainer_cpu_usage_total_2 + name: Portainer CPU + icon: mdi:cpu-64-bit + + - type: custom:button-card + template: bearstone_infra_kpi + entity: sensor.portainer_memory_usage_percentage_2 + name: Portainer Memory + icon: mdi:memory + + - type: custom:button-card + template: bearstone_infra_kpi + entity: sensor.portainer_agent_cpu_usage_total_2 + name: Agent CPU + icon: mdi:cpu-64-bit + + - type: custom:button-card + template: bearstone_infra_kpi + entity: sensor.portainer_agent_memory_usage_percentage_2 + name: Agent Memory + icon: mdi:memory - type: custom:vertical-stack-in-card card_mod: @@ -150,42 +249,17 @@ square: false cards: - type: custom:button-card - template: bearstone_infra_list_row + template: bearstone_infra_kpi entity: sensor.carlo_nas01_temperature name: NAS Temperature icon: mdi:nas - type: custom:button-card - template: bearstone_infra_list_row + template: bearstone_infra_kpi entity: sensor.carlo_nvr_temperature name: NVR Temperature icon: mdi:video-box - - type: custom:button-card - template: bearstone_infra_status_kpi - entity: input_text.infra_duplicati_backup_verification_status - name: Docker Config Backup - icon: mdi:backup-restore - variables: - ok_state: verified - state_display: > - [[[ - const status = String(entity?.state ?? 'unverified').toLowerCase(); - const raw = String(states['input_datetime.infra_duplicati_backup_last_success']?.state ?? ''); - const parsed = raw ? new Date(raw.replace(' ', 'T')) : null; - const when = parsed instanceof Date && !Number.isNaN(parsed.getTime()) - ? parsed.toLocaleString('en-US', { - month: 'short', - day: 'numeric', - hour: 'numeric', - minute: '2-digit' - }).toUpperCase() - : 'NO SUCCESS TIME'; - if (status === 'verified') return `SUCCESS · ${when}`; - if (status === 'failed') return `FAILED · LAST SUCCESS ${when}`; - return `UNVERIFIED · LAST SUCCESS ${when}`; - ]]] - # Core statistics-graph is required because mini-graph-card can only read # the 180-day recorder window, while long-term statistics retain 12 months. - type: statistics-graph @@ -301,3 +375,4 @@ - !include /config/dashboards/infrastructure/popups/docker_17_maintenance.yaml - !include /config/dashboards/infrastructure/popups/docker_69_maintenance.yaml - !include /config/dashboards/infrastructure/popups/docker_14_maintenance.yaml + - !include /config/dashboards/infrastructure/popups/docker_13_maintenance.yaml diff --git a/config/dashboards/infrastructure/popups/docker_13_maintenance.yaml b/config/dashboards/infrastructure/popups/docker_13_maintenance.yaml new file mode 100644 index 00000000..40b76d0d --- /dev/null +++ b/config/dashboards/infrastructure/popups/docker_13_maintenance.yaml @@ -0,0 +1,49 @@ +###################################################################### +# @CCOSTAN - Follow Me on X +# For more info visit https://www.vcloudinfo.com/click-here +# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig +# ------------------------------------------------------------------- +# Infrastructure Popup - docker_13 maintenance +# Codex appliance host APT status and maintenance history. +# ------------------------------------------------------------------- +# Notes: docker_13 is the codex-appliance host; its reboot remains last in the host sequence. +# Notes: No destructive host controls are exposed here because appliance maintenance is host-owned. +###################################################################### + +type: custom:bubble-card +card_type: pop-up +hash: '#infra-docker-13' +entity: sensor.docker_13_apt_status +button_type: state +name: docker_13 maintenance +icon: mdi:server +show_header: true +show_state: true +width_desktop: 520px +bg_opacity: '35' +cards: +- type: grid + columns: 1 + square: false + cards: + - type: custom:button-card + template: bearstone_infra_tile + entity: sensor.docker_13_apt_last_update + name: Last Update + icon: mdi:update + variables: + label: Most recent package update + - type: custom:button-card + template: bearstone_infra_tile + entity: sensor.docker_13_apt_last_check + name: Last Check + icon: mdi:calendar-check + variables: + label: Most recent apt check + - type: custom:button-card + template: bearstone_infra_tile + entity: sensor.docker_13_apt_status + name: Apt Status + icon: mdi:package-up + variables: + label: Pending package summary diff --git a/config/dashboards/infrastructure/templates/button_card_templates.yaml b/config/dashboards/infrastructure/templates/button_card_templates.yaml index 667a1379..55f0561f 100644 --- a/config/dashboards/infrastructure/templates/button_card_templates.yaml +++ b/config/dashboards/infrastructure/templates/button_card_templates.yaml @@ -5,11 +5,12 @@ # ------------------------------------------------------------------- # Infrastructure Templates - custom:button-card # Related Issue: 1560 -# Shared `button_card_templates` used across Infrastructure views. +# Shared `button_card_templates` used across Infrastructure and Overview views. # ------------------------------------------------------------------- # Notes: Keep templates generic; view-specific tuning stays in the view partials. # Notes: The compact ribbon template supports Overview status and daily controls. # Notes: Mobile templates extend the ribbon with larger accessible tap targets and text. +# Notes: Named cards keep the icon beside the name; icons never consume a decorative row. ###################################################################### bearstone_infra_base: @@ -668,6 +669,26 @@ bearstone_infra_panel_header: - text-transform: uppercase - justify-self: start +bearstone_infra_panel_header_icon: + template: bearstone_infra_panel_header + show_icon: true + show_name: true + icon: mdi:view-dashboard-outline + styles: + card: + - padding: 6px 2px 10px 2px + grid: + - grid-template-areas: '"i n"' + - grid-template-columns: 20px minmax(0, auto) + - column-gap: 6px + - justify-content: start + icon: + - width: 18px + - color: var(--primary-color) + - justify-self: start + name: + - justify-self: start + bearstone_infra_list_row: show_icon: true show_name: true @@ -682,7 +703,6 @@ bearstone_infra_list_row: - box-shadow: none - border: 1px solid rgba(0,0,0,0.03) - background: rgba(0,0,0,0.02) - - width: 100% - box-sizing: border-box grid: - grid-template-areas: "\"i n s\"" @@ -871,24 +891,29 @@ bearstone_infra_kpi: - border: 1px solid rgba(0,0,0,0.03) - background: rgba(0,0,0,0.02) grid: - - grid-template-areas: "\"i\" \"n\" \"s\"" - - grid-template-rows: 22px min-content min-content - - row-gap: 6px - - justify-items: center + - grid-template-areas: '"i n" "s s"' + - grid-template-columns: 18px minmax(0, auto) + - grid-template-rows: 20px min-content + - column-gap: 6px + - row-gap: 5px + - justify-content: center icon: - width: 18px - color: var(--primary-color) + - justify-self: end name: - font-size: 11px - font-weight: 800 - opacity: 0.65 - text-transform: uppercase - - text-align: center + - text-align: left - letter-spacing: 0.6px + - justify-self: start state: - font-size: 16px - font-weight: 800 - opacity: 0.9 + - justify-self: center bearstone_infra_status_kpi: template: bearstone_infra_kpi @@ -1056,21 +1081,24 @@ bearstone_overview_ribbon_control: ]]] grid: - grid-template-areas: > - [[[ return variables?.mobile_compact ? '"i" "n" "s"' : '"i n" "i s"'; ]]] + [[[ return variables?.mobile_compact ? '"i n" "s s"' : '"i n" "i s"'; ]]] - grid-template-columns: > - [[[ return variables?.mobile_compact ? '1fr' : '28px 1fr'; ]]] + [[[ return variables?.mobile_compact ? '18px minmax(0, auto)' : '28px 1fr'; ]]] - grid-template-rows: > - [[[ return variables?.mobile_compact ? '18px 24px 12px' : 'min-content min-content'; ]]] - - column-gap: 0 + [[[ return variables?.mobile_compact ? '18px 12px' : 'min-content min-content'; ]]] + - column-gap: > + [[[ return variables?.mobile_compact ? '5px' : '0'; ]]] - row-gap: > - [[[ return variables?.mobile_compact ? '1px' : '0'; ]]] + [[[ return variables?.mobile_compact ? '3px' : '0'; ]]] + - justify-content: > + [[[ return variables?.mobile_compact ? 'center' : 'stretch'; ]]] icon: - display: > [[[ return 'block'; ]]] - width: > [[[ return '18px'; ]]] - justify-self: > - [[[ return variables?.mobile_compact ? 'center' : 'start'; ]]] + [[[ return variables?.mobile_compact ? 'end' : 'start'; ]]] - color: > [[[ const severity = String(variables?.status_severity ?? 'critical'); @@ -1095,7 +1123,7 @@ bearstone_overview_ribbon_control: - line-height: > [[[ return variables?.mobile_compact ? '12px' : 'normal'; ]]] - justify-self: > - [[[ return variables?.mobile_compact ? 'center' : 'start'; ]]] + [[[ return 'start'; ]]] - white-space: > [[[ return variables?.mobile_compact ? 'normal' : 'nowrap'; ]]] - overflow: > @@ -1103,7 +1131,7 @@ bearstone_overview_ribbon_control: - text-overflow: > [[[ return variables?.mobile_compact ? 'clip' : 'ellipsis'; ]]] - text-align: > - [[[ return variables?.mobile_compact ? 'center' : 'left'; ]]] + [[[ return 'left'; ]]] - opacity: 1 state: - color: > @@ -1125,7 +1153,7 @@ bearstone_overview_ribbon_control: - opacity: 1 bearstone_mobile_header: - template: bearstone_infra_panel_header + template: bearstone_infra_panel_header_icon styles: card: - padding: 10px 2px 8px 2px @@ -1159,17 +1187,19 @@ bearstone_mobile_control: - padding: 12px 10px - border-radius: 20px grid: - - grid-template-areas: '"i" "n" "s"' - - grid-template-columns: 1fr - - grid-template-rows: 34px min-content min-content + - grid-template-areas: '"i n" "s s"' + - grid-template-columns: 28px minmax(0, auto) + - grid-template-rows: 32px min-content + - column-gap: 8px - row-gap: 6px + - justify-content: center icon: - - width: 32px - - justify-self: center + - width: 28px + - justify-self: end name: - font-size: 18px - line-height: 22px - - justify-self: center + - justify-self: start - white-space: normal - overflow: visible - text-overflow: clip @@ -1182,8 +1212,8 @@ bearstone_mobile_control: bearstone_overview_sleep_summary: template: bearstone_infra_kpi - show_icon: false show_label: true + show_icon: true variables: score_attribute: '' green_threshold: 88 @@ -1193,9 +1223,16 @@ bearstone_overview_sleep_summary: - min-height: 62px - padding: 8px 12px grid: - - grid-template-areas: '"n" "s" "l"' - - grid-template-rows: min-content min-content 14px + - grid-template-areas: '"i n" "s s" "l l"' + - grid-template-columns: 18px minmax(0, auto) + - grid-template-rows: 20px min-content 14px + - column-gap: 6px - row-gap: 1px + - justify-content: center + icon: + - width: 18px + - color: var(--primary-color) + - justify-self: end name: - font-size: 12px - font-weight: 900 @@ -1229,22 +1266,24 @@ bearstone_health_kpi: - grid-template-areas: > [[[ return variables?.detail_layout - ? '"i" "n" "s" "l"' - : '"i" "n" "s"'; + ? '"i n" "s s" "l l"' + : '"i n" "s s"'; ]]] - - grid-template-columns: minmax(0, 1fr) + - grid-template-columns: 18px minmax(0, auto) - grid-template-rows: > [[[ return variables?.detail_layout - ? '22px min-content min-content minmax(18px, auto)' - : '22px min-content min-content'; + ? '20px min-content minmax(18px, auto)' + : '20px min-content'; ]]] + - column-gap: 6px + - justify-content: center name: - font-size: 12px - font-weight: 900 - opacity: 0.8 - - justify-self: stretch - - width: 100% + - justify-self: start + - width: auto - min-width: 0 - white-space: normal - overflow: visible @@ -1261,6 +1300,7 @@ bearstone_health_kpi: - overflow: visible - text-overflow: clip - line-height: 22px + - text-align: center label: - font-size: 12px - font-weight: 600 @@ -1375,3 +1415,35 @@ bearstone_infra_update_row: if (variables.apt_severity === 'healthy') return 'rgba(46,125,50,1)'; return 'var(--secondary-text-color)'; ]]] + +bearstone_infra_update_tile: + template: bearstone_infra_update_row + styles: + card: + - min-height: 96px + - padding: 10px + grid: + - grid-template-areas: '"i n" "s s" "l l"' + - grid-template-columns: 18px minmax(0, auto) + - grid-template-rows: 20px min-content min-content + - column-gap: 6px + - row-gap: 3px + - justify-content: center + icon: + - width: 18px + - justify-self: end + name: + - justify-self: start + - text-align: left + - white-space: normal + state: + - justify-self: start + - padding-left: 0 + - text-align: center + - white-space: normal + - line-height: 16px + label: + - justify-self: center + - padding-top: 0 + - text-align: left + - line-height: 14px diff --git a/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml b/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml index c2e560f7..4fe84ef0 100644 --- a/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml +++ b/config/dashboards/kiosk_satellite_staging/partials/home_sections.yaml @@ -12,7 +12,7 @@ # 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; Phyn detail includes a confirmed main-valve restore action. +# 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: 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. ###################################################################### @@ -639,24 +639,14 @@ 'person.justin': 'sensor.justin_location_display', 'person.paige': 'sensor.paige_location_display' }[detailSubject]; - const latitude = Number(person?.attributes?.latitude); - const longitude = Number(person?.attributes?.longitude); const personName = person?.attributes?.friendly_name || pretty(detailSubject.split('.')[1]); const rawLocation = pretty(state(locationEntityId)); const withoutName = rawLocation.replace(new RegExp(`^${personName}\s+`, 'i'), ''); const location = withoutName.replace(/\s*\(since\s+[^)]+\)\s*$/i, '').trim(); - const mapUrl = Number.isFinite(latitude) && Number.isFinite(longitude) - ? `https://www.openstreetmap.org/export/embed.html?bbox=${longitude - 0.018}%2C${latitude - 0.012}%2C${longitude + 0.018}%2C${latitude + 0.012}&layer=mapnik&marker=${latitude}%2C${longitude}` - : ''; kicker = 'FAMILY LOCATION'; title = `${personName} · ${location || pretty(person?.state)}`; icon = 'mdi:map-marker-account-outline'; - body = mapUrl ? html` -