Added a local audio script to leverahe new media directory
This commit is contained in:
parent
dd369b1087
commit
350096654b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue