From c1aec19626d5ffe4c6a4f5975358b386471dee38 Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Thu, 30 Apr 2026 11:57:39 -0400 Subject: [PATCH] Update HA automations, scripts, and sidebar config docs --- config/README.md | 2 +- config/automation/README.md | 2 +- config/automation/kitchen_sink_circadian.yaml | 18 +++++ config/packages/infrastructure.yaml | 6 +- config/script/README.md | 2 +- config/script/speech_processing.yaml | 71 +++++++++++++------ config/www/custom-sidebar-config.yaml | 7 +- 7 files changed, 77 insertions(+), 31 deletions(-) diff --git a/config/README.md b/config/README.md index 27a17542..2c030447 100755 --- a/config/README.md +++ b/config/README.md @@ -38,7 +38,7 @@ Live view of the `config/` directory my production Home Assistant instance loads - **Templates (`templates/`)** – Jinja helpers and speech templates reused by the notify/speech engines. - **Dashboards (`dashboards/`)** – YAML-managed Lovelace dashboards and UI resources (generated from storage, then maintained as code). - **www/ + custom components** – branding assets, floorplans, and any custom components the core install depends on. -- **Custom Sidebar (`www/custom-sidebar-config.yaml`)** – restores the Developer Tools shortcut in the bottom sidebar through the HACS-managed Custom Sidebar plugin. +- **Custom Sidebar** – `www/custom-sidebar-config.yaml` controls the bottom Developer Tools shortcut; HACS owns the plugin files under `www/community/custom-sidebar`. ### Featured automations by section | Section | Why start here | Featured automation(s) | diff --git a/config/automation/README.md b/config/automation/README.md index 7660295e..6477ac7d 100755 --- a/config/automation/README.md +++ b/config/automation/README.md @@ -28,7 +28,7 @@ Event-driven automations that sit outside the self-contained packages. These tie | File | Why it matters | | --- | --- | | [garage_entry_light.yaml](garage_entry_light.yaml) | Z-Wave door sensor + motion-controlled garage entry lighting. | -| [kitchen_sink_circadian.yaml](kitchen_sink_circadian.yaml) | Sink light follows a soft morning, warm daytime, and sunset color-temperature schedule. | +| [kitchen_sink_circadian.yaml](kitchen_sink_circadian.yaml) | Sink light follows a soft morning, warm daytime, and sunset color-temperature schedule, and stays off while TV is playing. | | [dark_rainy_day.yaml](dark_rainy_day.yaml) | Weather-aware lighting helper for gloomy days. | | [dash_buttons.yaml](dash_buttons.yaml) | Amazon Dash buttons repurposed as quick triggers. | | [good_night.yaml](good_night.yaml) | Whole-house shutdown and lock-up routine. | diff --git a/config/automation/kitchen_sink_circadian.yaml b/config/automation/kitchen_sink_circadian.yaml index 53fbf5e2..275f7fab 100644 --- a/config/automation/kitchen_sink_circadian.yaml +++ b/config/automation/kitchen_sink_circadian.yaml @@ -6,7 +6,9 @@ # Kitchen Sink Circadian Light - all-day white tuning # Turns on after morning bed exits, follows the sun, and shuts down at bedtime. # ------------------------------------------------------------------- +# Related Issue: n/a # Notes: Uses color temperature only to avoid inherited color scenes. +# TV playback keeps the sink off so media time does not re-light it. ###################################################################### - alias: "Kitchen Sink Circadian Daylight" @@ -29,6 +31,10 @@ to: "on" for: "00:05:00" id: bed_in + - platform: state + entity_id: media_player.living_room_ultra + to: "playing" + id: tv_playing - platform: sun event: sunrise offset: "-00:30:00" @@ -61,6 +67,8 @@ or is_state('person.stacey', 'not_home') %} {% set evening = is_state('sun.sun', 'below_horizon') or now().hour >= 20 or now().hour < 4 %} {{ evening and carlo_done and stacey_done }} + tv_active: >- + {{ is_state('media_player.living_room_ultra', 'playing') }} awake_home: >- {% set carlo_awake = is_state('person.carlo', 'home') and is_state('binary_sensor.sleepnumber_carlo_carlo_is_in_bed', 'off') %} @@ -93,9 +101,19 @@ manage_sink: >- {{ is_state('group.family', 'home') and is_state('input_boolean.guest_mode', 'off') + and not (tv_active | bool) and ((awake_home | bool) or is_state('light.sink', 'on')) and (is_state('light.sink', 'on') or now().hour >= 4) }} - choose: + - conditions: + - condition: template + value_template: "{{ tv_active | bool }}" + sequence: + - service: light.turn_off + target: + entity_id: light.sink + data: + transition: 60 - conditions: - condition: template value_template: "{{ bedtime_active | bool }}" diff --git a/config/packages/infrastructure.yaml b/config/packages/infrastructure.yaml index 1a01e0ba..563cd22f 100644 --- a/config/packages/infrastructure.yaml +++ b/config/packages/infrastructure.yaml @@ -9,7 +9,7 @@ # Related Issue: 1584 # Notes: Home dashboard consumes `infra_*` entities for exceptions-only alerts. # Notes: Domain warning threshold is <30 days; critical threshold is <14 days. -# Notes: Nightly Duplicati verification is performed by codex_appliance against the Duplicati API because HA backup entities are not available. +# Notes: Nightly Duplicati verification is performed by codex_appliance after the Duplicati retry window because HA backup entities are not available. # Notes: Monthly HA log hygiene review requests Telegram + GitHub issue follow-up only; Joanna must wait for approval before any changes. # Notes: Numeric WAN telemetry exposes state_class so recorder can keep long-term statistics. # Notes: Docker host root disk usage uses Glances-backed normalized sensors; raw Glances sensors are recorder/logbook-filtered. @@ -578,7 +578,7 @@ automation: mode: single trigger: - platform: time - at: "06:15:00" + at: "06:45:00" action: - variables: trigger_context: "HA automation infra_backup_nightly_verification (Infrastructure - Backup Nightly Verification)" @@ -633,7 +633,7 @@ automation: entity_ids: - "switch.duplicati_container" diagnostics: >- - scheduled_time=06:15:00, + scheduled_time=06:45:00, duplicati_container={{ duplicati_state }}, verifier_http_status={{ verify_http_status }}, verifier_status={{ verify_status }}, diff --git a/config/script/README.md b/config/script/README.md index e6fecf46..34ffb504 100755 --- a/config/script/README.md +++ b/config/script/README.md @@ -31,7 +31,7 @@ Reusable scripts that other automations call for notifications, lighting, safety | [notify_live_activity.yaml](notify_live_activity.yaml) | Shared helper for tagged live activity/live update pushes and clear commands. | | [send_to_logbook.yaml](send_to_logbook.yaml) | Generic `logbook.log` helper for Activity feed entries (Issue #1550). | | [joanna_dispatch.yaml](joanna_dispatch.yaml) | Shared AGENT engineer dispatch contract that routes HA-detected issues into Joanna/BearClaw remediation. | -| [speech_engine.yaml](speech_engine.yaml) | TTS/announcement orchestration with templated speech. | +| [speech_engine.yaml](speech_engine.yaml) | TTS/announcement orchestration with templated speech; speech processing also routes garage Echo announcements and office Echo announcements when the office lamp switch indicates active PC work. | | [monthly_color_scene.yaml](monthly_color_scene.yaml) | Seasonal lighting scenes used across automations. | | [interior_off.yaml](interior_off.yaml) | One-call "all interior lights off" helper. | diff --git a/config/script/speech_processing.yaml b/config/script/speech_processing.yaml index 403f350a..7f7bc405 100755 --- a/config/script/speech_processing.yaml +++ b/config/script/speech_processing.yaml @@ -1,22 +1,17 @@ -#------------------------------------------- -# Speech Processing Script -# Description: Sends notifications to ChromeCast Audio devices -# -# Features: -# - Operates during specified hours -# - Activates when family is home or guest/vacation mode is on -# - Adjustable volume based on time of day -# -# Usage: -# action: -# service: script.speech_engine -# data: -# media_player: [target_media_player] -# speech_message: [message_to_speak] -# -# Original Repo: https://github.com/CCOSTAN/Home-AssistantConfig -# Follow me on https://www.vcloudinfo.com/click-here -#------------------------------------------- +###################################################################### +# @CCOSTAN - Follow Me on X +# For more info visit https://www.vcloudinfo.com/click-here +# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig +# ------------------------------------------------------------------- +# Speech Processing Script - shared spoken announcement delivery +# Sends OpenAI-polished speech to Chromecast targets and routed Echo announcements. +# ------------------------------------------------------------------- +# Related Issue: 798 +# Notes: Operates only when family/guest/vacation and speech notification +# guards allow it, with time-aware volume. +# Notes: Garage Echo is an always-on announcement target. Office Echo is +# added when switch.office_lamp_switch is on, which tracks active PC work. +###################################################################### speech_processing: mode: queued @@ -79,18 +74,50 @@ speech_processing: {{ speech_message }} response_variable: agent + - variables: + speech_response: "{{ agent.response.speech.plain.speech }}" + routed_media_players: "{{ media_player | string | lower }}" + - service: tts.cloud_say data: - entity_id: media_player.livingroomCC + entity_id: > + {{ media_player }} options: voice: JennyNeural message: >- - {{ agent.response.speech.plain.speech }} + {{ speech_response }} cache: false + - choose: + - conditions: + - condition: template + value_template: "{{ 'media_player.garage' not in routed_media_players }}" + sequence: + - service: notify.alexa_media_garage + continue_on_error: true + data: + message: "{{ speech_response }}" + data: + type: announce + + - choose: + - conditions: + - condition: state + entity_id: switch.office_lamp_switch + state: 'on' + - condition: template + value_template: "{{ 'media_player.office' not in routed_media_players }}" + sequence: + - service: notify.alexa_media_office + continue_on_error: true + data: + message: "{{ speech_response }}" + data: + type: announce + - event: openai_response event_data: - response: "{{ now().strftime('%B %d,%Y %-I:%M %p') }} {{ agent.response.speech.plain.speech }}" + response: "{{ now().strftime('%B %d,%Y %-I:%M %p') }} {{ speech_response }}" - service: input_boolean.turn_off data: diff --git a/config/www/custom-sidebar-config.yaml b/config/www/custom-sidebar-config.yaml index 87bd644d..bae7f9f2 100644 --- a/config/www/custom-sidebar-config.yaml +++ b/config/www/custom-sidebar-config.yaml @@ -3,10 +3,11 @@ # For more info visit https://www.vcloudinfo.com/click-here # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # ------------------------------------------------------------------- -# Custom Sidebar - Developer Tools shortcut -# Restores Developer Tools as a bottom sidebar item. +# Custom Sidebar - Sidebar shortcut configuration +# Related Issue: 1572 +# Adds a bottom-fixed Developer Tools link through elchininet/custom-sidebar. # ------------------------------------------------------------------- -# Notes: Custom Sidebar is loaded via frontend.extra_module_url and managed by HACS. +# Served as /local/custom-sidebar-config.yaml; plugin loads via HACS. ###################################################################### order: