Lovelace: Mini Media Player

I’m not familiar with squeezebox so can’t say, but yeah, it’s not available in the squeezebox component.

So i’d need to replicate the sonos service sonos.join and sonos.unjoin?

Basically, yes.
It has to be supported in the backend in order for me to add support for it in the card,

But I’m not even sure if squeezebox has official multiroom support to begin with? If it doesn’t, it could be quite tricky/impossible to implement.

Oh yes it does! In the docs it is referred to as synchronisation. Basically any players synched together will play the same media, and you can control from any player, or over the API or web page. Works very well, and did long before sonos was even a thing.

1 Like

I’ve tried multiple times to get the preconfigured buttons containing playlist links to work but they dont do anything when i press them. HA-log is silent. Everything else seem to work as it should.

I’ve tried the example code you’ve provided in your github aswell (visible below) but no luck there either.
Do ppl have this working at the moment? And does the below code work for you?

  • entity: media_player.spotify
    type: custom:mini-media-player
    artwork: cover
    source: icon
    hide:
    volume: true
    shortcuts:
    columns: 4 # Max buttons per row
    buttons:
    # Start predefined playlist
    - icon: mdi:cat
    type: playlist
    id: spotify:user:spotify:playlist:37i9dQZF1DZ06evO2O09Hg

Please post your code properly. How to help us help you - or How to ask a good question

@kalkih thanks mate, I’ll continue tinkering!

1 Like

Yes, it works, note that the id format has to be supported by the platform, a spotify uri for example will most likely not work on other platforms than spotify.

When I try to use the grouped card with multiple Sonos players using the code provided, I get the following error:

Your config is not supported by the UI editor:
**Expected a value of type `{entity,name,icon} | entity-id` for `entities.0.type` but received `"custom:mini-media-player"`.**
Falling back to YAML editor.

Please post the config.
You could also try using the raw UI editor.

That is the error in the raw config editor. It doesn’t work as written below because of the leading dash.

- type: entities
  entities:
    - type: custom:mini-media-player
      entity: media_player.multiroom_player
      group: true
      source: icon
      info: short
      hide:
        volume: true
        power: true
    - type: custom:mini-media-player
      entity: media_player.kitchen_speakers
      group: true
      hide:
        controls: true
    - type: custom:mini-media-player
      entity: media_player.bathroom_speakers
      group: true
      hide:
        controls: true
    - type: custom:mini-media-player
      entity: media_player.bedroom_speakers
      group: true
      hide:
        controls: true
    - type: custom:mini-media-player
      entity: media_player.patio_speakers
      group: true
      hide:
        controls: true

It’s actually from the GUI editor when it can’t auto-configure a card it switches to yaml mode but it’s not the same thing as the raw editor.

Okay, so it does work when you remove the dash?

With some work I got it working. Not sure how to get rid of the grouping count.

I used the following in the config:

show_group_count: false

I dont fully understand what you mean rookie here :frowning:

I’ve got spotify as default music playback on my alexa devices and im trying to click the button from HA in a chrome browser from a windows machine - nothing…

Is it possible to run amazon music playlists in the “id”-tag? It was not mentioned in the manual so i guess not?

Make sure show_group_count is inside the speaker_group option object, see example, you obviously don’t have to list any Sonos entities if you don’t plan to use the group management feature.

Sorry, what I really meant is that most media player integrations handle things differently, so Spotify uri’s are as far as I know only supported in the Spotify component.

Since there are tens or maybe even hundreds of media player platforms/components I can’t possibly have examples covering every use case, unfortunately.

The service the shortcuts call to play media (play_media) is not specific to this card, everything you can achieve through the play_media service works through the shortcuts.

Amazon music and even Spotify should work through the alexa media player component I believe, check out these examples, media_content_id = shortcut id & media_content_type = shortcut type.

I hope that cleared up things, and if not, let me know! :slightly_smiling_face:

What I’m trying to accomplish is just a list of my Sonos speakers and volume. I have that working, but it has the group count, and I’m not sure why.

type: entities
entities:
  - type: 'custom:mini-media-player'
    entity: media_player.multiroom_player
    hide:
      volume: true
      power: true
      progress: true
      info: true
      source: true
  - type: 'custom:mini-media-player'
    entity: media_player.sonos_playbar
    group: true
    show_group_count: false
    hide:
      controls: true
      power: true
      progress: true
      info: true
      source: true
      group_count: true
      icon: true

I know, read my last reply again, the answer is right there.

Got it, thank you!

1 Like

Sorry for jumping in. Have you manage to group you google home minis? I have tried but with no luck. I have created a group in the app but I can not find it in HA. Any idea?
Many thanx