mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
45 lines
1.1 KiB
YAML
45 lines
1.1 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 |