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

30 lines
938 B
YAML

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