1
0
ansible-home-assistant/scripts/120.music-bathroom.yaml

30 lines
938 B
YAML
Raw Normal View History

2023-04-25 15:53:20 +00:00
bathroom_music_play:
alias: '[Bathroom] Music play'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.music_service
state: 'Apple Music'
sequence:
- service: media_player.select_source
data:
source: Party 2.1
target:
entity_id: media_player.bathroom
- conditions:
- condition: state
entity_id: light.hallway_light
state: 'Spotify'
sequence:
- service: media_player.play_media
target:
entity_id: media_player.bathroom
data:
media_content_id: "{{ states('input_text.bathroom_playlist') }}"
media_content_type: music
- service: media_player.shuffle_set
entity_id: media_player.bathroom
data:
shuffle: true