Home-AssistantConfig/script/voice_notify.yaml

40 lines
1.1 KiB
YAML
Raw Normal View History

2017-02-03 18:51:50 +00:00
######################################################################################################
###Script to send notifications to the ChromeCast Audios during normal hours and only when we are home! Call like this:
2017-02-03 18:51:50 +00:00
# action:
# service: script.Voice_notify
2017-02-03 18:51:50 +00:00
# data_template:
# value1: 'Startup: Home Assistant is Up and Running!'
# OR
# value1: "{{ trigger.to_state.state }}"
2017-02-03 18:51:50 +00:00
######################################################################################################
voice_notify:
2017-02-03 18:51:50 +00:00
sequence:
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: group.family
state: 'home'
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
- condition: time
before: '20:00:00'
- service: switch.turn_on
entity_id: switch.living_room_amp
- delay: '00:00:10'
- service: tts.google_say
entity_id: media_player.whole_house
data_template:
message: "{{ value1 }}"
cache: true
2017-02-03 18:51:50 +00:00