Lovelace: Mini Media Player

Seconding heartkingz request for button theming. Similarly added the line to the theme.yaml, reloaded HA and cleared cache but to no avail so far.


Sadly, this makes the picons unreadable on a light theme. Other than that a great card and pretty easy to customize even for somebody with little coding experience.

2 Likes

Is there a way to keep it “always on”?
I have a LG TV without a way to know if it’s on or off, and i have the TV and the MMP in the opposite state (one off and one on). I prefer to have MMP always on, showing the commands.

What state is your TV reporting?
Try creating a universal media player and map the on state attribute to be always on.

I double checked and theming of the button works fine for me through the new theme variable.
Did you perhaps install the card through HACS? HACS is having serious issues with updating cards, it will display the updated version but in reality the file on disk isn’t updated.

Try reinstalling the card through HACS or try to install it manually.

2 Likes

Hey,

Have any one else experienced when casting your Spotify Content to a Chromecast and wants to use the “Buttons”, to start a Playlist, then nothing happens. But, this is only the case when casting. If I listen to music on my phone and then presses the button, then it changes just fine.

I know for sure that it has worked before, but I’m not sure when exactly this stopped working :frowning:
image

Did installed it via HACS. Reinstalled the media player and it starts working. Stupid I haven’t tried that ;D

While this works, lower buttons does not theme the same way. Do I need to use another variable to theme these?

Thanks!

Reinstall obviously did it. Thanks.

How did you make the round corners on the buttons?
Thank you.

Ok, will look into it.

Edit: found the issue, fix in next release.

They should be rounded by default: border-radius: 4px

1 Like

Thanks again! @Kabala, indeed, didn’t change a thing :grin:Maybe the variable —ha-card-border-radius is overwritten by another value in your theme? Must say that i don’t know for sure if this value also affects the rounded corners for these buttons.

Hi

I use 4 buttons to play preset internet radio stations on my Linkplay ceiling speakers. Problem is that no cover art/logo or media info is displayed and i have no idea what station i’m listening to.
If I play spotify or use my phone app to play the same stations from Tunein then the artwork and info is displayed correctly.

Is there any way to show the station logo from the internet stream like the way Tunein shows?
Or is there even a way to manually specify stations logos for the 4 buttons so when a particular stream is playing a specified logo is shown instead of the cast icon in the player?

I am currently using Google Dark Theme and border-radius: 15px is the default. But apparently not for the buttons

What could be the reason?
Thank you


Media metadata such as artwork and track/station/artist is handled in the component. What component are you using? The card is simply exposing the attributes coming from the component.

Not really, you could try to achieve it with config-template-card by dynamically changing the card’s background option, but if the component doesn’t expose what’s playing I don’t know how you could know what’s playing.

ha-card-border-radius has nothing to do with the buttons, it’s the border radius of the card itself.
But your buttons doesn’t look like they have a border radius at all, should be 4px in later version of this card.
Try updating/reinstalling the card maybe?

that was it…
image

Thank you.

1 Like

On HA 0.105 with the new Spotify integration, I’m having a problem with the progress bar.
The duration of the media is the right one but I have a factor of approx. 2 between the real position of the media and the one indicated by the card.
(The “media_position” shown by the media_player entity is the correct one)

spotfiy

Hello,

I suspect this is an issue in the updated Spotify component.
After a quick glance it seems like media_position_updated_at is reported very infrequent and isn’t really accurate/correct.
The card relies on media_duration, media_position, media_position_updated_at and the current time to calculate the progress. The reason we can’t use just media_duration & media_position is because media_position is not updated in “real time”, usually only updated when an attribute change in the component or on a specific interval.

You’ll see the same issue with the progress in the default media-control card.

I suggest opening an issue in the home assistant github repo.

1 Like

Hi, 1381 post on this topic, I stopped at #300 with reading and still did not find what I was looking foor, thus try this way.

What I have:
config.yaml

media_player:
  - platform: onkyo
    host: 192.168.1.135
    name: ONKYO

lovelace, media control card:

entity: media_player.onkyo
toggle_power: false
type: 'custom:mini-media-player'

Gives me:
image

2 questions:

  1. How can I have the power button work correctly? I can turn the onkyo on, but not off…
    I can use both following services (on and off) and the onkyo goes on and off:
    image
    How can I get the button in the mini media player to also work correctly?

  2. I see in the mini media player that when spotifiy is playing on the onkyo it has “network_net” selected. But I can not “select” that entry if I use the drop down from the mini media player. How can I add that?
    If I add:

media_player:
  - platform: onkyo
    host: 192.168.1.135
    name: ONKYO
    sources: 
      network_net: "NET"

I get:
image

not what I want :slight_smile:
Any help is appreciated

  1. Try
toggle_power: true
  1. No idea sorry.

Anyone manage to use a local image as a button? I’m trying to use some .png images for TV channel buttons but using ‘image:’ isn’t working.