From 46bfa9c01d19a2e9b0d634e75220fc670a9b578f Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 10 Aug 2022 23:25:11 +0200 Subject: [PATCH] Migrate from sonos.join/unjoin to media_player --- configuration/automations/f1.yaml | 10 +++---- configuration/automations/home-music.yaml | 34 ++++++----------------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/configuration/automations/f1.yaml b/configuration/automations/f1.yaml index 75f9274..aecc604 100644 --- a/configuration/automations/f1.yaml +++ b/configuration/automations/f1.yaml @@ -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 diff --git a/configuration/automations/home-music.yaml b/configuration/automations/home-music.yaml index 66efa8c..50a6e1d 100644 --- a/configuration/automations/home-music.yaml +++ b/configuration/automations/home-music.yaml @@ -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