Dashboard: Sonos card

I’m very surprised that works actually. :thinking: The code requires a number between 50 and 100.

What can I say, here’s what I’m using. Works perfectly.

            type: custom:sonos-card
            sections:
              - volumes
              - groups
              - grouping
              - media browser
              #- player
            hideGroupCurrentTrack: true
            groupingTitle: ''
            predefinedGroups:
              - name: Living Room and Fireplace
                entities:
                  - media_player.sonos_fireplace
                  - media_player.sonos_living_room
              - name: Master Bedoom and Bathroom
                entities:
                  - media_player.sonos_bathroom
                  - media_player.sonos_master_bedroom
              - name: Main House
                entities:
                  - media_player.sonos_bathroom
                  - media_player.sonos_fireplace
                  - media_player.sonos_kitchen
                  - media_player.sonos_living_room
                  - media_player.sonos_master_bedroom
            predefinedGroupsTitle: 'Groups'
            heightPercentage: auto
            card_mod:
              style: |
                ha-card {
                  color: grey !important;
                  background: white;
                  --accent-color: #c0c0c0;
                  #--primary-color: white;
                  #--secondary-text-color: #808080;
                  #--secondary-background-color: #e0e0e0;
                }

I am currently playing with predefinedGroups which is a great feature! While enjoying the feature, I do observe 2 things here (I hope I have not overlooked anything in the instructions):

  1. When I select such a group, it does not get selected in the players section as well. On the contrary, the current selection remains unless the currently selected player is affected. It would be very handy if a group selection would also change the players selection!

  2. I have defined a group in which one of the players is occasionally without power for reasons. When I now select this group, only a short error message is displayed by HA that this player does not exist. Otherwise nothing happens, although other players do exist and are online. It would be great if these remaining players were grouped anyway!

Is that (technically) possible to be implemented? Many thanks! :pray:

1 Like

Yes, basic config at this point.

tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Sonos
      dismissable: true
      content:
        type: custom:sonos-card
2 Likes

Wonderful work friend, it’s great. Everything seems correct to me. The only thing I don’t know is point n.4, which I don’t know how to add an icon that is not mdi to an entity. Can you clarify how to do it? As always, thank you very much for the work you do, I find it incredible.

Install this one in HACS GitHub - elax46/custom-brand-icons: Custom brand icons for Home Assistant

1 Like

love the new card. Is there a way to switch the input of the soundbar to TV again?

Same as before. From documentation GitHub - johanfrick/custom-sonos-card at v6

customSources: # Main use case is probably to set tv media player to play TV sound
  media_player.tv: # set this to 'all' to show the custom source for all players
    - title: TV
      thumbnail: https://cdn-icons-png.flaticon.com/512/716/716429.png
1 Like

I have addressed the first bullet in your post. Please try it out in this release: v6_alpha-6.

Regarding the second bullet, I am quite unsure if that can be handled in a good way unfortunately.

1 Like

I don’t know how to change the entity even if I installed it, can you be generous and give me a hand?, and also how to do it in the groups, I don’t know where you can define to change the icon. Thanks in advance.

  1. Settings
  2. entities
  3. select your media player
  4. Click the cogwheel
  5. Update icon field
1 Like

Wonderful, I don’t know how I can thank you for all the work. Thank you.

BMC ?
:grin:

Wonderful :clap:t2::clap:t2::clap:t2::clap:t2:

1 Like

Excellent, @PunxsutawneyPhil! Thank you!

1 Like

Fixed this now, please try with v6_alpha-7

1 Like

Works perfectly! Thank you! :slight_smile:

1 Like

This is an awesome card! Would love to also see support for casting devices. I understand that this is a sonos card, and that casting devices will not benefit from the grouping capabilities. But there is no universal media-player out there looking as nice as this! :star_struck:

I know it’s possible to group predefined speakers in the living room and put them under a button.

Something like this”


predefinedGroups:
  - name: Woonkamer en Keuken
    entities:
      - media_player.homecinema
      - media_player.tv
      - media_player.erker
      - media_player.tafel
      - media_player.keuken
  - name: Alleen Woonkamer
    entities:
      - media_player.homecinema
      - media_player.tv
      - media_player.erker
      - media_player.tafel

But what I miss is the ability to set a predefined volume per speaker as well. For example my homecinema speakers get the volume 3, the kitchen volume 9, erker volume 5, tafel volume 4. I never can set the starting volume anywhere.

@PunxsutawneyPhil
Can this being add at the V6 version which you are developing now? Or is this available already for the V5.x Sonos Card?

That’s a great suggestion. I’ll see when there is time to build it, but probably after the initial v6 release (non-beta).
Feel free to create an issue in Github for it.