Home-AssistantConfig/config/script/speech_engine.yaml

53 lines
1.6 KiB
YAML
Raw Normal View History

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
# # @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
######################################################################################################
speech_engine:
mode: queued
2018-01-02 00:00:45 +00:00
sequence:
- condition: or
conditions:
- condition: state
entity_id: group.family
state: 'home'
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
- service: script.speech_processing
data_template:
media_player: >-
{% if media_player | length == 0 %}
{% set media_player = [
'media_player.livingroomcc',
'media_player.bedroom'
2018-01-02 00:00:45 +00:00
] %}
{% endif %}
{% if media_player is not string and media_player is sequence %}
{% set media_player = media_player|join(', ') %}
{% endif %}
{{ media_player }}
speech_message: !include ../templates/speech/briefing.yaml
2018-01-02 00:00:45 +00:00
- service: input_boolean.turn_off
data:
entity_id:
- input_boolean.home_stats
- input_boolean.responsibilities