Add second music provider
This commit is contained in:
parent
8b08b246ee
commit
e83254b36c
@ -40,12 +40,7 @@
|
||||
entity_id: media_player.bathroom
|
||||
data:
|
||||
shuffle: true
|
||||
- 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: script.bathroom_music_play
|
||||
|
||||
- id: bathroom-music-button-play
|
||||
alias: '[Bathroom] Music button - play'
|
||||
@ -68,16 +63,7 @@
|
||||
entity_id: media_player.bathroom
|
||||
state: playing
|
||||
action:
|
||||
- service: media_player.shuffle_set
|
||||
entity_id: media_player.bathroom
|
||||
data:
|
||||
shuffle: true
|
||||
- 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: script.bathroom_music_play
|
||||
|
||||
- id: bathroom-music-button-pause
|
||||
alias: '[Bathroom] Music button - play/pause'
|
||||
|
@ -101,6 +101,11 @@ input_select:
|
||||
- Party
|
||||
- Away
|
||||
icon: "mdi:home"
|
||||
music_service:
|
||||
name: Music service
|
||||
options:
|
||||
- Spotify
|
||||
- Apple Music
|
||||
input_text:
|
||||
bathroom_playlist:
|
||||
name: Bathroom playlist
|
||||
|
29
scripts/120.music-bathroom.yaml
Normal file
29
scripts/120.music-bathroom.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user