2018-01-02 00:00:45 +00:00
|
|
|
######################################################################################################
|
|
|
|
###Script to send notifications to the ChromeCast Audios during normal hours and only when we are home! Call like this:
|
|
|
|
# action:
|
|
|
|
# service: script.speech_engine
|
|
|
|
# data:
|
|
|
|
# call_no_announcement:
|
|
|
|
# call_dark_outside:
|
|
|
|
# call_window_check:
|
|
|
|
# call_garage_check:
|
|
|
|
# call_responsibilities
|
|
|
|
# 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-02 00:00:45 +00:00
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
|
|
######################################################################################################
|
|
|
|
|
2022-12-19 23:44:47 +00:00
|
|
|
# Define the "speech_engine" script
|
2018-01-02 00:00:45 +00:00
|
|
|
speech_engine:
|
2022-12-19 23:44:47 +00:00
|
|
|
# Set the mode to "queued"
|
2020-08-02 16:20:08 +00:00
|
|
|
mode: queued
|
2022-12-19 23:44:47 +00:00
|
|
|
# Define the sequence of actions to be performed
|
2018-01-02 00:00:45 +00:00
|
|
|
sequence:
|
2022-12-19 23:44:47 +00: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-02 00:00:45 +00: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 23:44:47 +00:00
|
|
|
# Run the "script.speech_processing" service with the specified media player and speech message
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: script.speech_processing
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2022-12-19 23:44:47 +00: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 17:13:36 +00: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 23:44:47 +00:00
|
|
|
# Include the speech message from the "speech/briefing.yaml" template file
|
2019-09-10 13:00:21 +00:00
|
|
|
speech_message: !include ../templates/speech/briefing.yaml
|
2018-01-02 00:00:45 +00:00
|
|
|
|
2022-12-19 23:44:47 +00:00
|
|
|
# Turn off the "input_boolean.home_stats" and "input_boolean.responsibilities" input booleans
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: input_boolean.turn_off
|
|
|
|
data:
|
|
|
|
entity_id:
|
|
|
|
- input_boolean.home_stats
|
|
|
|
- input_boolean.responsibilities
|