Sonos Group Master - is it broken? How to adjust group volume?

EDIT: I’m bumping this because it is a simple question and I don’t believe there is no simple answer.


I don’t see the master attribute anymore for my Sonos media players and whilst I can successfully join a group of speakers I can find no way to adjust the volume of the group as a whole.

Can this still be done?


For example,
This will join sonos1 and sonos2 - note that master: is required for the sonos.join service

sonos_group_some_speakers:
  sequence:
    - service: sonos.join
      data:
        master: media_player.sonos1
        entity_id:
          - media_player.sonos1
          - media_player.sonos2

…but this only changes the volume of sonos1, NOT sonos2, which has been joined to the group.

      - service: media_player.volume_set
        data_template:
          entity_id: media_player.sonos1
          volume_level: 0.5

And neither entity has a master attribute which I am pretty sure used to be the case.

Hey there, just started with HA, was having the same problem, and I found a workable solution. Mini media player has a speaker group object in its speaker group management card option that allows you to sync the volume on grouped speakers. Here is the relevant part of my sonos speaker card:

    speaker_group:
      platform: sonos
      sync_volume: true
      entities:

Here’s the whole thing to give you more context and show the use of the mini media player plugin. I used and entity filter card and regex to only show the coordinator(s) of the group(s):

type: entity-filter
entities:
  - type: 'custom:mini-media-player'
    entity: media_player.kitchen
    attribute: sonos_group
    artwork: material
    info: scroll
    hide:
      power: true
    speaker_group:
      platform: sonos
      sync_volume: true
      entities:
        - entity_id: media_player.kitchen
          name: Kitchen
        - entity_id: media_player.kitchen_2
          name: Kitchen2
        - entity_id: media_player.playroom
          name: Playroom
        - entity_id: media_player.living_room
          name: Living Room
    state_filter:
      - attribute: sonos_group
        operator: regex
        value: '^..media_player.kitchen[^_]'
  - type: 'custom:mini-media-player'
    entity: media_player.kitchen_2
    attribute: sonos_group
    artwork: material
    info: scroll
    hide:
      power: true
    speaker_group:
      platform: sonos
      sync_volume: true
      entities:
        - entity_id: media_player.kitchen
          name: Kitchen
        - entity_id: media_player.kitchen_2
          name: Kitchen2
        - entity_id: media_player.playroom
          name: Playroom
        - entity_id: media_player.living_room
          name: Living Room
    state_filter:
      - attribute: sonos_group
        operator: regex
        value: ^..media_player.kitchen_2
  - type: 'custom:mini-media-player'
    entity: media_player.playroom
    attribute: sonos_group
    artwork: material
    info: scroll
    hide:
      power: true
    speaker_group:
      platform: sonos
      sync_volume: true
      entities:
        - entity_id: media_player.kitchen
          name: Kitchen
        - entity_id: media_player.kitchen_2
          name: Kitchen2
        - entity_id: media_player.playroom
          name: Playroom
        - entity_id: media_player.living_room
          name: Living Room
    state_filter:
      - attribute: sonos_group
        operator: regex
        value: ^..media_player.playroom
  - type: 'custom:mini-media-player'
    entity: media_player.living_room
    attribute: sonos_group
    artwork: material
    info: scroll
    hide:
      power: true
    speaker_group:
      platform: sonos
      sync_volume: true
      entities:
        - entity_id: media_player.kitchen
          name: Kitchen
        - entity_id: media_player.kitchen_2
          name: Kitchen2
        - entity_id: media_player.playroom
          name: Playroom
        - entity_id: media_player.living_room
          name: Living Room
    state_filter:
      - attribute: sonos_group
        operator: regex
        value: ^..media_player.living_room
        sync_volume: true

Hopefully this helps and saves people some time!

1 Like

I maintained the master speaker myself which is part of automations/scripts I used. You could try to reuse my automations/scripts: Music Follow Me - Sonos Speakers Group/Ungroup Based on Presence

Very, very cool, thanks for sharing!

Update to this, in case anyone reads it: the sonos_group attribute is now group_members