mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
alias: Nursery Bedtime Button
|
|
id: automation_nursery_bedtime_button
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.nursery_bedtime
|
|
|
|
condition: []
|
|
|
|
action:
|
|
- service: input_select.select_option
|
|
data:
|
|
option: Nightlight
|
|
target:
|
|
entity_id: input_select.nursery_mode
|
|
|
|
- service: input_select.select_option
|
|
data:
|
|
option: Running Rainbow
|
|
target:
|
|
entity_id: input_select.nursery_wled
|
|
|
|
- service: automation.trigger
|
|
target:
|
|
entity_id: automation.nursery_wled_changed
|
|
|
|
#- condition:
|
|
- alias: "Do not restart the music if it is already playing"
|
|
condition: not
|
|
conditions:
|
|
condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.ytube_music_player
|
|
state: "playing"
|
|
- condition: state
|
|
entity_id: media_player.ytube_music_player
|
|
attribute: remote_player_id
|
|
state: "media_player.nursery_hub"
|
|
- condition: state
|
|
entity_id: media_player.ytube_music_player
|
|
attribute: current_playlist_title
|
|
state: "Kid's Goodnight Songs"
|
|
|
|
#- service: script.goodnight_kids_youtube_music
|
|
- action: media_player.shuffle_set
|
|
data:
|
|
shuffle: false
|
|
target:
|
|
device_id: be28c87a729c28b9b27b540589895e20
|
|
|
|
- action: media_player.repeat_set
|
|
data:
|
|
repeat: all
|
|
target:
|
|
device_id: be28c87a729c28b9b27b540589895e20
|
|
|
|
- action: music_assistant.play_media
|
|
data:
|
|
media_id: library://playlist/3
|
|
media_type: playlist
|
|
enqueue: replace
|
|
target:
|
|
device_id: be28c87a729c28b9b27b540589895e20 |