mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
38 lines
1013 B
YAML
38 lines
1013 B
YAML
alias: Nursery White Noise On
|
|
id: automation_nursery_white_noise_on
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.nursery_asleep
|
|
to: "on"
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.ma_nursery_hub
|
|
state: "playing"
|
|
sequence:
|
|
- service: media_player.media_stop
|
|
target:
|
|
entity_id: media_player.ma_nursery_hub
|
|
|
|
#- service: input_select.select_option
|
|
# data:
|
|
# entity_id: input_select.nursery_mode
|
|
# option: 'Off'
|
|
|
|
# The kids can turn on their own sounds. Just stop the music
|
|
# - service: media_player.volume_set
|
|
# data:
|
|
# volume_level: 0.6
|
|
# target:
|
|
# entity_id: media_player.nursery_hub
|
|
|
|
# - service: media_player.play_media
|
|
# target:
|
|
# entity_id: media_player.nursery_hub
|
|
# data:
|
|
# media_content_id: media-source://media_source/local/sounds/relaxing/thunderstorm/thunderstorm.mp3
|
|
# media_content_type: audio/mpeg
|