Dashboard: Sonos card

Nice!
I built another feature just for you, you should try it out: entityNameRegex :slightly_smiling_face:
(To get rid of “SONOS” in your names)

That’s actually designed like that because of the downstream issues with Alexa confusing bedroom with bedroom sonos. It’s been a while since I took a look at that and it may not even be an issue anymore but that was the reason I was forced to name them like that at one time. I’ve seen other people name them similarly and I assumed it was for the same reason. I’ll give it a look. Thanks!

Maybe I’m not using it correctly?

type: custom:custom-sonos-card
name: ''
groupsTitle: ''
groupingTitle: ''
favoritesTitle: ''
headerImage: ''
shuffleFavorites: false
noMediaText: No media selected
allVolumesText: All volumes
entityNameRegex: /SONOS //
entities:
  - media_player.bedroom_sonos
  - media_player.bedroom_2_sonos
  - media_player.deck_sonos
  - media_player.dining_room_sonos
  - media_player.garage_sonos
  - media_player.living_room_sonos
  - media_player.media_room_sonos
  - media_player.office_sonos
  - media_player.stairway_sonos

But I don’t notice any difference

Please add single quotes: ‘/SONOS //’
out

Amazing! Thank you!
Just one other “aesthetic” that I wonder can be customized:
image

Any way to increase the transparency (decrease opacity) of the boxes with the title and the volume/ shuffle controls? And maybe move the media control buttons down and out of the middle of the cover art?

I ask a lot, I know…but you’ve delivered a lot!

1 Like

Thanks!

Sure, use “–sonos-player-section-background” (https://github.com/johanfrick/custom-sonos-card#theme-variables). I’d like to keep the default as is, since I’ve seen issues with reading the text when increasing the transparency.

I can look into the buttons :slight_smile:

1 Like

HA keeps removing them when I click save. No apparent change:


The ‘entityNameRegex’ setting is not working for me either. Otherwise a great addition to HA!
I am using the card so much I would love to be able to alter my “Favorites” (maybe when playing something, an “Add to Favorites” button and one to “Remove from Favorites”).

This card makes the Favorites more useful than in the Sonos app.

Thanks for the work on this!
Paul Earley

1 Like

Hey guys, I still don’t see the card when one of my two sonos speakers is not available
Had I missed something?
I have used the original example yaml

@Sergeantpup @paulearley Upgrade to https://github.com/johanfrick/custom-sonos-card/releases/tag/v2.0.4 and use this new format:

entityNameRegexToReplace: 'SONOS ' # Regex pattern to replace parts of the entity names
entityNameReplacement: ''

Which version are you using? This was fixed in https://github.com/johanfrick/custom-sonos-card/releases/tag/v1.1.0

Please open your home assistant in web browser and check the console log for any errors. (Log messages in the Console - Chrome Developers)

Added this to my theme yaml file
image

Now getting this error, can you steer me in the right direction?
image

I use the latest version, but nothing changed so far
I will check logs some day this week, busy working these days

Hello,

I changed this and it still wasn’t changing anything but I figured out why. I swapped to edge just to make sure it wasn’t a browser issue and it wasn’t. Then I removed the space after SONOS in 'SONOS ’ and it worked. I know the reason why the space is there, it just didn’t work for MY particular naming convention. It would’ve worked fine with my old naming convention of SONOS Media Room but Media Room SONOS doesn’t have a space on the end. So now I have the beautiful layout:

1 Like

I don’t think there is an API available to add/remove favorites :frowning:

@BeastHouse Please try this beta, I found a bug with the theming vars. Should be fixed now.

@terryhonn Use the beta above to check how you like the new position of the media controls.

This is beautiful! I love it, Phil, thank you!

1 Like

Thanks, came up with the same error. Added parentheses around the hex value and errors are gone. I cannot however, get the colours to change in the UI after adding them to my theme yaml files.

Example, I just set everything to hot pink, and there is no hot pink in the card after doing a frontend.reload_themes service call.

Edit: Working now! So much hot pink :laughing:

1 Like

I could not find one either. Not a problem.
Paul

There is a REST call: Sonos Developer. But this may not be worth tackling at this point. I will look into this further.
Paul