Sonos - How does yours look?

I’m curious what others are using in Lovelace for Sonos control. I have a Playbar/Sub, Connect:Amp for outdoor speakers and two Ones. I am using the Mini Media Player Card but curious if others have found creative ways to select sources, start, stop and group Sonos speakers.

1 Like

1 Like

Hope its ok to revive an old thread? I’m looking for better/alternative ways to manage sonos from my wall tablets. This is mine:


note theres a bug (or new ‘feature’?!) with mini-media-player since 0.115, where the checkboxes dont show in the group management… issue on github.
I don’t really like this layout, to be honest, I find grouping a bit of a pain with tiny targets (even when checkboxes are showing). As I only have 3 sonos devices it works OK… but I’ve got another in the post so wont be able to have all four rooms on a row like this. We frequently have 2 or 3 different things playing at the same time, its nice to see all at a glance, and change volume in one space, but I’d be interested to try a one-room-per-view setup perhaps.

1 Like

Can you group your rooms? How did you make this dash?

you could just put those in a swiper card, i plan to get some sonos speakers down the road for music to “follow me” in my house

if you see here i have three thermostats one for each floor of my town home

1 Like

@david1 This is brilliant, I hadn’t come across this before, is it the one by bramkragten/swipe-card?

2 Likes

Slider is an interesting idea. This is what I came up with. I’m not sure that I like the design just yet but the functionality is there.

The top section are all input_select buttons for the speakers. They select which speaker is the master and determine which media player is showing.

The media player card is a series of conditional cards so that only the player for the above selected speaker is visible. I also added my own volume buttons.

The Playlists section just activates scripts to play a playlist from my Sonos sources on the selected speaker.

The Group section is a series of switch buttons that group a speaker with the master. The buttons are conditional so that the Group button of the master speaker is hidden.

The code for all of this is pretty complex as it incorporates a decluttering cards and button card templates. I am sure that I will try to incorporate some of the new media player options as well.

6 Likes

I know this is slightly off topic but does anyone here know how define or identify the ‘master’ of a group of Sonos? It used to be an attribute but seems to have disappeared a few versions ago. I can find no way to adjust the volume of a group any more.

1 Like

I LOVE this! In trying to figure out how each conditional card works, I can imagine it gets very complicated… I still might try to emulate your general idea though, I hadn’t thought of using conditional cards. I especially like the group buttons - had something similar setup when I used hadashboard in the past. I also had buttons for each player to run scripts which started sonos playlists in the relevent room - I just deleted all these old unused scripts last week though! Might have to go dig through my backups to revive them…

Thanks so much for sharing, its given me some real inspiration to bring this into my frontend…

The master is the first entity in the in the sonos_group attribute, this should be the case if nothing has changed in the past few months.

You define the master in the sonos_join service call.

1 Like

I’m a noob but I love this! Maybe my aspirations are to high but I want to know how to creat this! Can you share your Lovelace configuration? How do you set up the conditional card? Do I need to add certain repo’s from HACS besides the button card?

Can you share your config? This looks awesome !

@queelyte @devastator

I will give it a shot. I do not not have my config on github or anything. I completely cobbled this together. Let me try to clean it up a bit and see how i can share it.

2 Likes

VMCosco love the sonos card, did you end up cleaning up the config and sharing it anywhere?

@queelyte @devastator @nixdat

I gave it my best shot. I saved them to Github just because it seemed the easiest place to dump the files that I created but it is not my actual HA config folder. I simply cut out the parts for this view. I am not sure if you will be able to sift through it all or not. My Lovelace config is completely split up so you will have to follow the connections of all of the files. I would suggest going through the files in this order:

  1. Configuration Entries - gets all of the sensors, inputs, switches and scripts set up. Once you have that done, I would recommend creating this basic card to make sure that the script works:
type: entities
entities:
  - entity: input_select.sonos_master
  - entity: input_select.sonos_playlist
  - entity: script.play_sonos
title: Sonos Test Script
  1. Button Card Templates - I’m not going to go through using this card and templates, there is plenty of documentation out there.

  2. Decluttering Templates - I’m not going to go through using this card and templates, there is plenty of documentation out there. These contain much of the frontend functionality

  3. Sonos Cards

  4. Sonos View

I hope this helps.

7 Likes

VMCosco, I love the look of this and am trying to get it working.
Would you mind sharing your ‘sonos-header’ button_card_template please?

My apologies. I thought I had included it. I also added it to the card templates file on my github

# Sonos Header
  sonos_header:
    color: none
    color_type: label-card
    styles:
      card:
        - height: 10px
      name:
        - font-size: 24px
        - justify-self: start
        - padding: 0px 30px
        - font-variant: small-caps
1 Like

excellent thank you @VMCosco for the Github link will be giving this a go this evening

hello nice layout

where do i put the code of the templates files ??

Nico

Like the look, will see how far I can get to making this work… I also have a split up HA setup. If I get it working, might be able to help some others…