Dashboard: Sonos card

I can’t seem to figure this out… I would just like to use the custom:sonos-player card, and always play to the same 2 speakers. I would like to keep my dashboard minimalistic, so I don’t want to see the groups (I don’t need it because I always play to the same 2 speakers) and other panels.

The card keeps on asking for the entityId (which can to my knowledge only be 1 speaker)…

Yeah, not really what the card is designed for, but you can still do it that way if you just specify entity ID as the main Sonos player of your group

Is there a way to return the entity_picture attribute when the Sonos source is TV (Since this is not an attribute for the Sonos entity). A copy and paste of the current url shows what I am trying to achieve.

mediaArtworkOverrides:
  - mediaTitleEquals: TV
    imageUrl: >
      http://homeassistant.local:8123/api/media_player_proxy/media_player.android_fire_tv_max?token=6d62b9a179a97b241306fcdd791cbe69e9d224b59a62e37074db8964bbebf153&cache=1675042503.351415

When the source is TV, this is the entity_picture I would like from my Fire TV displayed:

{{ state_attr('media_player.android_fire_tv_max', 'entity_picture') }}

I have also written a template that returns the full URL as a state:

{{ states.sensor.fire_tv_max_screenshot.state }}

I know I cannot just whack a Jinga template into a js add-on, but played around with something like this:

mediaArtworkOverrides:
  - mediaTitleEquals: TV
    imageUrl: >
      [[[ return states['sensor.fire_tv_max_screenshot'].state[variables.backgroundImage]]];

Any ideas, or is this impossible without some major coding? :grinning:

I have tried adding the entity_picture attribute to the Sonos entity, but could not find a way around customizing being static and not being as the token changes.

Yeah, probably requires quite a bit of coding. Need to figure out how to support templates in card config :thinking:

Amazing work!, thank you for all your efforts! Is there any way to change the sort order of the favorites in the media browser card? Looks like it follows the order in which I added to favorites in the Sonos app but would be nice to have some sort of control. Basic ask would be A-Z sorting (via YAML not user-facing) but an even cooler feature request would be a way to manually (again, via YAML) control which favorites display and then use multiple media browser cards with custom titles. For example, one card shows radio stations, another card shows my wfie’s favorites, etc…

Any thoughts on if this would be possible or if others would find this useful?

Should be possible, please create an issue in Github and I’ll see when I find time


PunxaPhil

BMC

Hi! Is there a way to be able to add more then like 45 Icons in My Sonos, or maybe to be able to browse a local mediafolder in this Card? My local mediafolder is present in Sonos App, but I can´t see it in the card, so that I can browse the mediafiles. That would be great.

Hey, After a recent update the styles for this card seem not to be working anymore, I had the Volume Slider height increased which i really liked, has anyone experienced this issue?

Heres my code

entityId: media_player.living_room
singleSectionMode: player
skipAdditionalPlayerSwitches: true
disableDynamicVolumeSlider: false
styles:
  player-song:
    color: orange
    font-family: Helvetica
  player-volume-range:
    height: 3rem
  player-switch:
    height: 5rem 

Just started using this card.
1rst question how do I access the individual volumes?
2nd question what exactly do the icons in the grouping dashboard do…is it ungrouping a group?
3rd question can you define groups as an example “Main Floor” that would include sonos in different rooms on the main floor
3rd question answered sorry I missed it

groupingTitle: ''
predefinedGroups: # defaults to empty
  - name: Inside
    entities:
      - media_player.matrum
      - media_player.hall
predefinedGroupsTitle: 'My predefined groups' # default is 'Predefined Groups'

Yeah, I’m afraid I had to replace the previous volume slider implementation. It was hard to maintain. Now I am using the built in one from home assistant (paper slider). Not as easy to style though, but the default user experience is much better.

  1. Click the volume slider, or click the expand icon Screenshot from 2023-03-10 21-03-39
  2. Group all and ungroup all
1 Like

Try the Mushroom volume control. I switched to that and it’s working well.

Thanks, but I think it would be a bad idea to base the sonos card on other custom cards. That would then require all users of the sonos card to also install mushroom cards.

1 Like

I gave up on the Sonos card and have built out everything manually like the old days.

If you gave up, why are you hanging out in this thread? :wink:

Just never deleted the fav and always in hope of some magical improvement to the card. For now, my system is smooth and well.

What kind of magical improvement are you looking for? Maybe I can make it happen :slightly_smiling_face:

Hi!
Regarding magical improvment, it would be superduper if it was possible to have more then like 45 Sonos favorites. I know this seems to be an restriction in Sonos, but it is a big one, I think. So if it was possible to add my local NAS with Albums on it, that would fix it, I think. Thank you for a great card.

Hi guys,

Is there a way to change the border color in the dark theme, say to a darker shade of grey like the one of the buttons in mushroom shadow/dark theme?

Sure, just take a look at the CSS/Styling section of the documentation in the first post (or on Github).