Lovelace: Mini Media Player

Hello,

Can anyone help me out with this:

I can’t seem to get it working.
I want a couple of buttons to select my radio station.
I have this:

  • cards:
    • entity: media_player.keuken
      type: ‘custom:mini-media-player’
      info: scroll
      volume_stateless: true
      shortcuts:
      buttons:
      - type: channel
      name: Studio Brussel
      data:
      media_content_id: ‘http://icecast.vrtcdn.be/stubru-high.mp3
      media_content_type: audio/mp4
      hide:
      power_state: false
      source: true

When i press the button, i get following:

Try this:

- type: channel
  name: Studio Brussel
  id: http://icecast.vrtcdn.be/stubru-high.mp3

Or type should perhaps be audio/mp4.

@kalkih
you’re the best.
It works.
Any ideas on how to see the info of what is playing?
now it is saying default media receiver.

afbeelding

Guys, I have trouble using this to play Spotify playlists on my Sonos speaker.
Can someone give me a working example of how can I do that?
What I have in mind is to have my Spotify Playlists as selection in a drug down window.

Thanks!
There’s unfortunately no way if the media player doesn’t expose the required metadata, like in your case.

You could use Sonos “favorites” I believe, they should appear in the source dropdown If I recall correctly.
Another solution would be to install spotcast and call the spotcast service from the shortcuts like the last shortcut in this example.

Thanks Kalkih but I cannot find any Spotify lists under the source. The only think that exists under source are my tunein favourite stations.

Try this


Or if that doesn’t work, give spotcast a shot!

Still no „native“ support for heos group play :frowning:

@kalkih
That did the trick.
I did this

type: 'custom:mini-media-player'
entity: media_player.sonos_one
artwork: full-cover-fit
icon: 'mdi:spotify'
hide:
  power: true
shortcuts:
  columns: 3
  buttons:
    - name: Nicolas Greek
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Nicolas Greek
    - name: Nicolas Classics
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Nicolas Classics
    - name: Nicolas Laika
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Nicolas Laika
    - name: Nicolas Kenny G
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Nicolas Kenny G
    - name: Angela Classics
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Angela Classics
    - name: Angela Favourite
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Angela Favourite
    - name: Super Sport FM 104.0 (Sports Talk & News)
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Super Sport FM 104.0 (Sports Talk & News)
    - name: Klik FM 105.5 (Adult Hits)
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Klik FM 105.5 (Adult Hits)
    - name: Love fm Cyprus
      type: service
      id: media_player.select_source
      data:
        entity_id: media_player.sonos_one
        source: Love fm Cyprus`Preformatted text

How can I change the icon which now is always spotify depending of what is being played. For example the first 6 buttons are spotify playlists, they should have one icon and the next 3 are TuneIn radio stations they should have another icon

1 Like

I am also getting this error message
Logger: homeassistant.components.media_player
Source: components/media_player/init.py:904
Integration: Media player (documentation, issues)
First occurred: 2:31:01 PM (29 occurrences)
Last logged: 2:41:07 PM

The websocket command media_player_thumbnail is deprecated. Use /api/media_player_proxy instead.

I’m getting the same error. Not sure if this is related to mini media player or some media player component
Which media player are you using?

There is an icon option for shortcuts.

This has been addressed in thee latest version of the card.

Hey, guys. I’m trying to add remote-type functionality to my media player with arrows up, down, etc. Using it to control my TV.
Unfortunately, I can’t get any kind of service to work with the buttons. Any suggestions?

entity: media_player.tv
hide:
  power_state: false
hide_controls: true
idle_view: true
shortcuts:
  buttons:
    - name: test
      type: service
      id: light.toggle
      data:
        entity_id: light.bad
    - data:
        entity_id: media_player.tv
        button: RIGHT
      icon: 'mdi:arrow-right-bold'
      id: webostv.button
      type: service
    - data:
        button: UP
        entity_id: media_player.tv
      icon: 'mdi:arrow-up-bold'
      id: webostv.button
      type: service
  columns: 3
type: 'custom:mini-media-player'
volume_stateless: true

I am still getting this error even with after the upgrade to 1.7.0

It’s not an error, it’s just a warning.
Try clearing cache or reinstalling the card, the new version does not use that API anymore. You’re probably still loading the old card version from cache, unless something else is using this API as well.

Looks good to me.


Can someome tell me why is the timer below keep changing 1:12:51 even if the music is stopped?

In addition, how can I change the colour from white to something else.
I have found out the parameter mini-media-player-overlay-base-color but I do not know where to use it to.

Is it possible and if yes how, to stylish also the buttons inside the shortcuts? I mean font, font size, colours etc… ?

Thanks for the latest update @kalkih the “group all” and “leave” buttons theme the same way as the shortcuts. :+1:t3:

1 Like

I am using vertical stack and my list is cropped. I am missing the top two selections. I cannot move up to select them.

Is there any way to get the media player to show your top 10 play lists instead on having to individually list them that way you can update you top 10 play lists on spotify and it would be reflected in the media player?