Files
Home-AssistantConfig/config/script/speech_engine.yaml
Carlo Costanzo 4457dc0bcd Refactor automation configurations and enhance documentation
- Updated guest_mode.yaml to clarify guest mode announcements and added a related issue reference.
- Enhanced night_watchdog.yaml with additional conditions for vacation mode and house sitter presence.
- Improved sunset_turn_on.yaml by refining action sequences and adding vacation presence logic.
- Expanded admin_sections.yaml to include new tiles for front door package detection and related inputs.
- Removed obsolete media player from media_players.yaml and updated switches.yaml to reflect new outdoor seasonal switch IDs.
- Enhanced home_modes.yaml and README.md to clarify home mode toggles and their usage.
- Updated docker_infrastructure.yaml to improve container outage notifications and streamline maintenance checks.
- Enhanced LLM Vision package to include front door package detection and related automation triggers.
closed https://github.com/CCOSTAN/Home-AssistantConfig/issues/793
2026-03-23 10:13:50 -04:00

66 lines
2.7 KiB
YAML
Executable File

######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Speech Engine Script - queued announcements to Chromecast targets
# Sends templated speech briefings to media players when family, guests, or vacation sitters are active.
# -------------------------------------------------------------------
# Notes: Optional call_* flags control sections (dark_outside, window/garage checks, garbage day, inside/outside weather). Defaults to living room Chromecast if no media_player is provided.
# Notes: Allows announcements while `input_boolean.vacation_mode` is on for house-sitter flows.
######################################################################
# Usage example:
# service: script.speech_engine
# data:
# call_no_announcement: 1
# call_dark_outside: 1
# call_window_check: 1
# call_garage_check: 1
# call_garbage_day: 1
# call_inside_weather: 1
# call_outside_weather: 1
# Define the "speech_engine" script
speech_engine:
# Set the mode to "queued"
mode: queued
# Define the sequence of actions to be performed
sequence:
# If family is home or a guest/vacation mode is active, proceed with the script
- condition: or
conditions:
- condition: state
entity_id: group.family
state: 'home'
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
- condition: state
entity_id: input_boolean.vacation_mode
state: 'on'
# Run the "script.speech_processing" service with the specified media player and speech message
- service: script.speech_processing
data:
# Set the entity ID for the media players to be controlled
# If the "media_player" variable is not defined, set it to a list of media player entities
# If the "media_player" variable is a list, convert it to a comma-separated string
media_player: >-
{% if media_player | length == 0 %}
{% set media_player = [
'media_player.livingroomcc'
] %}
{% endif %}
{% if media_player is not string and media_player is sequence %}
{% set media_player = media_player|join(', ') %}
{% endif %}
{{ media_player }}
# Include the speech message from the "speech/briefing.yaml" template file
speech_message: !include ../templates/speech/briefing.yaml
# Turn off the "input_boolean.home_stats"
- service: input_boolean.turn_off
data:
entity_id:
- input_boolean.home_stats