Sonos Join All - sonos.join

Current Sonos documentation has this:

I was able to group all my sonos speakers like this:

      - service: sonos.join
        data:
          master: media_player.kitchen

This doesn’t seem to work anymore, even though the documentation says entity_id is an optional argument. I have added all my sonos speakers under the entity_id option which does work, but it will require updating when new speakers are added. Have others had the same experience?

Can you use the term “all” for the entity ID?

1 Like

That worked. Thank you.

Awesome! I’m so glad it helped.

@jjross: So you mean instead of this:

  sequence:
    - service: sonos.join
      data:
        master: media_player.sonos_kjokken
      entity_id: 
        - media_player.sonos_stue
        - media_player.sonos_soverom
        - media_player.sonos_bad
        - media_player.sonos_kontoret
        - media_player.sonos_lekerom

I would do this?

  sequence:
    - service: sonos.join
      data:
        master: media_player.sonos_kjokken
      entity_id: 'all'

… it does not seem to work, though.

No quotes around “all”.

  group_all_sonos_speakers:
    alias: Group All Sonos Speakers
    sequence:
      - service: sonos.join
        data:
          master: media_player.kitchen
          entity_id: all

As stated previously I think you need to remove the quotes.

I’ve tried all three options…
“all”, ‘all’ and plain all without the quotes.

EDIT: I did som tuning, at it all worked now :slight_smile:
Thank you, @RonJ103 and @jjross

sonos_group_all_speakers:
  alias: Sonos Group All Speakers
  sequence:
    - service: sonos.join
      data:
        master: media_player.kjokken
        entity_id: all
1 Like

Newbie here :slight_smile: Tried this but get invalid config: Setup failed for sonos_group_all_speakers: Integration not found.

What am I missing?

You have this below (within) a script: section?

2 Likes

Nope, under groups: :woozy_face: Works much better under scripts: :grinning: Thanks!

1 Like

I think I am missing how and where to insert this code and how to use it.
I opened scripts and added a script called Join Sonos as such

sonos_group_all_speakers:
  alias: Sonos Group All Speakers
  sequence:
    - service: sonos.join
      data:
        master: media_player.lounge
        entity_id: all
mode: single

On trying to save this I get a
“Message malformed: extra keys not allowed @ data[‘sonos_group_all_speakers’]”
error…
Can someone point me at an intro to use scripts with sonos speakers.

  • Thanks again