Dashboard: Sonos card

Ok, same for me, but when decoding my CD i used an app which creates automatically also m3u files. They are not playable from the sonos card while i can play them from the Sonos app.

This does not sound like an issue specific to the Sonos card.

To see what is already available in your installation, have a look in the built in media browser of home assistant: http://homeassistant.local/media-browser/browser

@SPESINO I’ve made some modifications, please try out the new alpha: Release v6_alpha-3 · johanfrick/custom-sonos-card · GitHub

  • some font changes
  • changed the style of the grouping buttons

Would still be nice with some examples or sketches, since I suspect I don’t fully understand what you suggest.

1 Like




Good morning. First of all, great work that you are doing, and let it be clear that what I am going to show you is done in a short time and it is an idea because I don’t know if it can be done, basically it is just something of design. Attached 4 photographs. Let us begin.
Point 1: Can the title be the text size a little bigger so that the area can be seen?
Point 2: How can this text be changed or deleted? The truth is not very well in the design.
Point 3: Image design of the Album where you can see the inside of the cd with the artwork of each track on the cover and on the disc, the slightly larger size of the letter, and also the title (in this case, playlist ) I think it is small especially in mobile resolutions. It’s just an idea.
Point 4: In this view is where I see less design, it would be nice to put an image with the type of speaker it is, or the corresponding group if they come together, with an attached image, also to be able to put a title since it only marks the speakers that We have available, I don’t know, a twist.
Point 5: much better design than the previous one, but it would also be nice to be able to add a title to the “card” and the grouping of speakers, although the design has improved, if it is put in mobile mode it does not look well framed since his thing would be that It will be more centered for a better view. I hope I can help you as much as possible and thank you very much again first of all. All the best.

Really liking the new version.

My question is as I’m not using the player I have a lot of white space, can I use CSS to auto-fit the card?

Cheers

Lot’s of great ideas, thanks @SPESINO!

Changes in Release v6_alpha-4 · johanfrick/custom-sonos-card · GitHub according to your points above:

  1. Text size increased. Also showing name of predefined group if available.

  2. Changed text to “No media selected”. And you can configure to something else if you want, in the visual card editor.

  3. “Inside the CD” - No idea how to do this. Skipping it.

  4. Now supports icon, IF you have configured an icon for your entity in Home Assistant. It will always pick the icon of the master player. Also using name of predefined groups here.

  5. Buttons are now centered.

General: Titles on the sections I don’t agree with. They content of the section together with the footer icon should be enough.

4 Likes

The latest alpha release (v6_alpha-5) now includes a configurable height. Let me know how it works for you!

1 Like

That’s cool, I set this and it works perfectly.

heightPercentage: auto

This new version is outstanding. Popup card on mobile with a built-in exit! So nice and compact!

Glad you like it! How do you do the popup? Browser mod?

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.