2018-01-01 19:00:45 -05:00
######################################################################################################
2025-11-23 17:18:29 -05:00
###Script to send notifications to the ChromeCast Audios during normal hours and only when we are home! (Current target: living room Chromecasts only; use Alexa notify/announce services for other rooms.) Call like this:
2018-01-01 19:00:45 -05:00
# action:
# service: script.speech_engine
# data:
2025-07-22 12:00:39 -04:00
# value1:
2018-01-01 19:00:45 -05:00
# call_no_announcement:
# call_dark_outside:
# call_window_check:
# call_garage_check:
2025-07-22 12:00:39 -04:00
# call_garbage_day
2018-01-01 19:00:45 -05:00
# call_light_check
# call_inside_weather
# call_outside_weather
2024-09-03 18:08:43 +00:00
# Follow me on https://www.vcloudinfo.com/click-here
2018-01-01 19:00:45 -05:00
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
######################################################################################################
2022-12-19 18:44:47 -05:00
# Define the "speech_engine" script
2018-01-01 19:00:45 -05:00
speech_engine :
2022-12-19 18:44:47 -05:00
# Set the mode to "queued"
2020-08-02 12:20:08 -04:00
mode : queued
2022-12-19 18:44:47 -05:00
# Define the sequence of actions to be performed
2018-01-01 19:00:45 -05:00
sequence :
2022-12-19 18:44:47 -05:00
# If the state of the "group.family" entity is "home" or the state of the "input_boolean.guest_mode" entity is "on", proceed with the script
2018-01-01 19:00:45 -05:00
- condition : or
conditions :
- condition : state
entity_id : group.family
state : 'home'
- condition : state
entity_id : input_boolean.guest_mode
state : 'on'
2022-12-19 18:44:47 -05:00
# Run the "script.speech_processing" service with the specified media player and speech message
2018-01-01 19:00:45 -05:00
- service : script.speech_processing
2020-09-26 10:52:45 -04:00
data :
2022-12-19 18:44:47 -05:00
# 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
2022-06-23 13:13:36 -04:00
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 }}
2022-12-19 18:44:47 -05:00
# Include the speech message from the "speech/briefing.yaml" template file
2019-09-10 06:00:21 -07:00
speech_message : !include ../templates/speech/briefing.yaml
2018-01-01 19:00:45 -05:00
2025-07-22 12:00:39 -04:00
# Turn off the "input_boolean.home_stats"
2018-01-01 19:00:45 -05:00
- service : input_boolean.turn_off
data :
entity_id :
- input_boolean.home_stats