1
0

Migrate from sonos.join/unjoin to media_player

This commit is contained in:
Przemek Grondek 2022-08-10 23:25:11 +02:00
parent bb3e76bd6a
commit 46bfa9c01d
2 changed files with 14 additions and 30 deletions

View File

@ -17,13 +17,13 @@
media_content_type: music
target:
entity_id: media_player.bedroom
- service: sonos.join
- service: media_player.join
data:
master: media_player.bedroom
entity_id: media_player.bathroom
group_members: media_player.bathroom
target:
entity_id: media_player.bedroom
- service: script.tv_f1tv
- delay: '0:05:00'
- service: sonos.unjoin
data: { }
- service: media_player.unjoin
target:
entity_id: media_player.bathroom

View File

@ -12,9 +12,10 @@
entity_id: media_player.bedroom
state: playing
action:
- service: sonos.join
- service: media_player.join
data:
master: media_player.bedroom
group_members: media_player.bedroom
target:
entity_id: media_player.bathroom
- id: ra-music-bathroom-leave
@ -32,17 +33,8 @@
entity_id: media_player.bathroom
state: playing
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.bedroom
state: playing
sequence:
- service: sonos.join
data:
master: media_player.bedroom
- service: sonos.unjoin
data:
- service: media_player.unjoin
target:
entity_id: media_player.bathroom
- id: ra-music-bedroom-arrive
@ -59,9 +51,10 @@
entity_id: media_player.bathroom
state: playing
action:
- service: sonos.join
- service: media_player.join
data:
master: media_player.bathroom
group_members: media_player.bathroom
target:
entity_id: media_player.bedroom
- id: ra-music-bedroom-leave
@ -79,16 +72,7 @@
entity_id: media_player.bedroom
state: playing
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.bathroom
state: playing
sequence:
- service: sonos.join
data:
master: media_player.bathroom
- service: sonos.unjoin
data:
target:
entity_id: media_player.bedroom