Added a local audio script to leverahe new media directory

This commit is contained in:
Jeffrey Stone 2020-09-23 11:00:00 -04:00
parent dd369b1087
commit 350096654b
1 changed files with 22 additions and 0 deletions

View File

@ -143,6 +143,28 @@ automation:
script:
local_audio:
sequence:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: sensor.family_status
state: Home
- service: media_player.turn_on
entity_id: media_player.ha_speaker
- service: media_player.volume_set
data_template:
entity_id: media_player.ha_speaker
volume_level: >
{{ volume }}
- service: media_player.play_media
entity_id: media_player.ha_speaker
data_template:
media_content_type: "music"
media_content_id: >
{{ media }}
youtube_audio:
sequence:
- condition: state