Lovelace: Mini Media Player

Sorry, where you take the entity_picture?
thanks in advance :smiley:

Unfortunately not. I had no time to investigate this further.

I’m in the middle of building a dedicated tab for my audio media (radio streams, pandora stations, and spotify) through my Sonos system. My question is there a way to force a Cover Image (as a placeholder) when the stream doesn’t contain any metadata for Album artwork?

Has anyone actually managed to play tunein content on a Sonos with any trick?

(Sonos does not support a media type of “TUNEIN”)

I have all other speakers with tunein sources and wanted to include my Sonos speaker in the same card.

Add the station as a Favorite in the Sonos app and it should populate as a source. See this thread:

I would like the same thing but from what I’ve gathered you can’t. I haven’t tried it myself (yet) but it might be possible with something like card mod.

Yes, that is known, but I actually wanted tunein directly as a source, but that does not seem to work in no way. I was hoping that you can somehow fool sonos mp3 and he takes the tunein stream then.

If you can extract the URL to the stream it’s pretty easy, I have it setup that way to play a number of streams, the problem is it can be challenging to get the actual stream link out of TuneIn. An example of a direct stream link I have embedded in a script is:

action:
  - data:
      volume_level: 0.12
    entity_id: media_player.sonos_dining_room
    service: media_player.volume_set
  - delay: '00:00:02'
  - data:
      media_content_id: 'aac://ice66.securenetsystems.net/WPHD'
      media_content_type: music
    entity_id: media_player.sonos_dining_room
    service: media_player.play_media

Thanks for the suggestion, I’ll look at Card-Mod. I have to imagine that there is someway to build a placeholder image in the background and have MMP overlay the metadata on top of it. Right?? I can’t be the only one who is attempting to do this. LOL.

You’re welcome.

When I get to it I will try to use a template to check if the media player is playing and only set the default background on the right element if that’s not the case (i.e. not playing).

1 Like

I couldn’t find a way.
Wanted to have images and such when the AVR is using the sat/xbox and such.
In the end generated my own image display using a ‘generic camera’ as source so I can change the url to the image. That way I copy the streaming image value to the camera or set one of myself.
Would be nice if MMP would allow for a way to set images on fixed inputs (eg hdmi1).

Interesting approach, I’m still learning my way around HA and Lovelace. What entity did you use to send the miniplayer artwork to the generic camera? Mind sharing a snippet of the code?

Hi all,

Did you or anyone else ever succeed in getting card-mod to style any part of the mini media player card? I’ve been utterly unsuccessful… I’m just trying to get the text of my buttons to fit on the buttons.
image
I’ve tried a million things, here are a few:

        style: |
          .slot-container {
            margin: 0px !important;
          }
        style: |
          mmp-button {
            font-size: 6px !important;
          }
        style: |
          .mmp-shortcuts__button {
            display:  !important;
            width:  !important;
          }

Any sample of anyone who’s done any styling on this card wil be appreciated, especially on the buttons!

Answering my own question. Found a comment above about how you can’t use card-mod on the buttons because ::shadow and /deep/ have been depreciated (this explains a lot of card-mod failures actually, so glad I learned it). So I just went into the source and found slot-container and changed it’s margin to 0px and I got the below:

deprecated!

Thanks @GH2user, copy pasting your code doesn’t work for me. I suspect you posted part of the necessary code? Could ou post the full code?

Thanks!
FYI you may be interested in this in case you have multiple HEOS devices:
https://community.home-assistant.io/t/heos-group-support/

Hello, could you precise where in the source ?

I installed it via hacs which made it one file with one very long line, so no, I can’t. But the search term only returned 2 hits, so just go to the GitHub repo and search it.