Dashboard: Sonos card

Submitted both.

1 Like

Sorry for my beginner question but can someone tell me how I can install the module? What steps do I have to take exactly?

Have you installed HACS? If not; just do that and the process is fairly easy. Installing HACS can be found on youtube. If you are not able to install HACS the installation guide of this card is located on github page.

1 Like

Yes I have HACS installed. But I can’t find it? Is it in Frontend section or Integration section? Do I need to install a repository? In the description there is written something about installing a resource, but I could not find the right to do.

Should just be in HACS. Try rebooting :wink:

1 Like

I don’t find it, but somehow I have the feeling, that I am doing something completely wrong… do sou have a screenshot where to search for it? Sorry for spamming this post…

Okay, I got it. I had to go to the button at the bottom, to “Add …” in the “Frontend”-Section. Sorry and thanks for the support.

1 Like

Hi all, just a fast question here; is it possible to start a sonos favourite with a button card? I have a ‘fast shortcut’ dashboard filled with only buttons I want to use it here. I can start them from the browser section in the sonos card but that’s to big to use as a fast link.

Thanks

Can you share how you managed to addressed this issue you raised. I am in the process of building a media card that I would like it to work with non sonos sources and devices. If I could find a way to make this work this sonos card solves every possible scenarios.

@PlinyElderATX Did you ever figure out how to hide certain this? I’m trying to hide the controls and make this a separate section.

@PunxsutawneyPhil Is there a way to either make controls a separate section or to hide controls when using section player?

Updating to the latest release actually in the player section i can see ALL my media players.
How to make visible only the SONOS devices?

Use the entities section. See documentation

I am using that option as you can see:

          - type: custom:sonos-card
            sections:
              - groups
              - grouping
              - volumes
            entityId: media_player.salotto
            entities:
              - media_player.salotto
              - media_player.camera

But in the dashboard i have listed ALL my media players…
EDIT: Solved adding “excludeItemsInEntitiesList: false”

Thanks for pointing that out. excludeItemsInEntitiesList should default to false.
I have now fixed that bug and released v6.15.3

1 Like

Use card_mod. Lot’s of examples in the discussions in Github

For example: Add ARTWORK as individual section (separated from player) ¡ johanfrick/custom-sonos-card ¡ Discussion #164 ¡ GitHub

I found an issue where the “Browse Media” button does not work if you try to embed the Sonos card using the browser mod popup mod. Has anyone tried this?

type: custom:mushroom-template-card
entity: group.players_on
layout: vertical
primary: Sonos
secondary: []
icon: mdi:record-circle
icon_color: grey
badge_icon: >-
  {% set players = expand('group.players_on') |
  selectattr('state','eq','playing') | list | count %}  {% if players > 0 %}
  mdi:numeric-{{ players }}-circle {% else %} []  {% endif %}
badge_color: blue
picture: |-
  {% if is_state('media_player.sonos_kitchen','playing') %}
    {{ states.media_player.sonos_kitchen.attributes.entity_picture }}
  {% else %} /local/images/sonos_100.png {% endif %}
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      card_mod:
        style: |
          ha-dialog {
            --mdc-dialog-min-width: 800px !important;
          }
          .content {
            width: auto !important;
          }
      title: []
      content:
		type: horizontal-stack
        cards:
          - type: custom:sonos-card
            entityId: media_player.sonos_kitchen
            sections:
              - player
              - grouping
          - type: custom:sonos-card
            entityId: media_player.sonos_kitchen
             sections:
              - media browser

ezgif.com-crop

ezgif.com-crop

Yeah, that will be hard to support. Unless Home Assistant will start to expose a usable media browser card.
Also reported here: New Media Browser not working when card opened as popup inside a custom:button-card ¡ Issue #227 ¡ johanfrick/custom-sonos-card ¡ GitHub

Thanks for the reply, I though I was going nuts at first. I guess the work around would be to call another card. Not a big deal.