Lovelace: Mini Media Player

Just a thought. Why not use an automation or script for the sleep feature?
HA has all the stuff we need to achieve this, without making the mini player more complicated and therefore more prone to fail. My 2c :wink:

I was already thinking of doing this since it’s basically the reverse of a script I have for waking up to slowly increasing volume music but just thought I’d chime in on the already posted feature request. I guess that if it’s built into the media player it reduces the complexity of using that feature in multiple parts of our systems. ie: you don’t need to code it into each automation. but I get what you are saying also.

1 Like

As @lolouk44 said, this is pretty much a perfect fit for a script or an automation, you can then call the script from the media player shortcuts if you wish (as I described earlier).

1 Like

Hi all - does anyone know if / how i can have one mini media player card and be able to select which entity it controls rather than having a card per entity or each entity listed out in a card??

@bearded_bloke you could use the Lovelace conditional card and this hide and show players based on the selection of a button or input select.

1 Like

Yes, please consider conditional cards and an input select, should work great. You can find some information and config snippets for this approach here.

Instead of conditional cards, you could also try the new Templateable Lovelace card by @iantrich together with an input_select, should save you from having to add a conditional card for each entity.

1 Like

Another option is auto-entities, my config shows any players that are active, but an input-select might be usable to choose -

2 Likes

Is there anyway to hide this info from a sonos? (circled in red)

nevermind.

hide:
info: true

Hello guys,

is there a way to use own icons in ‘local’ folder ?
Thanks!

Hello there,

First of all thanks for this amazing card !

i have a request : i’ve setup a “source shortcut” to replace the big buttons i had previously.
the shorcuts does not reflect the state of source like my buttons did.
could that change ?

image

I also have an extra feature that would pause the player when i click on the activated source, but i would understand if you would not do that extra step.

Thanks !

Hi, not sure, but if you would like to use the fontawesome icons, take a look at this

I think you’ll have to continue using the button card if you want to display the current state unfortunately.

In order to add this feature we would have to keep track of every entity you use in the shortcuts config, which in my opinion is a bit out of scope for this project.

You could create a script where you change the source and pause the player, and then use that script in the shortcut button.

Well, in the case of “source” you already have the info available since there is a source dropdown ?

But that’s okay i’ll keep using my big buttons :slight_smile:

Yes, if it’s a source shortcut it should be possible to implement, I’ll see what I can do.

Such a great Card, I love it.

I am using Panel: True to stretch the media player across the top of my page as it my main volume control, is there any way to have the volume slider scale with the available width of the card as it can be a little small and fiddly when trying to control my quite powerful receiver in my home theater. A larger range to slide would make control more precise if possible.

Thanks for the great addition to HA

Do you mind sending me screenshot of your setup? I guess I could remove the max-width limit of the slider in the “non-compact” card config. I’ve actually never tried the card with panel set to true.

Idk if this is of interest to you but I found myself in a similar situation, where I wanted to make fine volume adjustments easier. I ended up using seperate card just for the volume control, where I hid everything except the volume slider.

30

- entity: media_player.avr_tv
  type: custom:mini-media-player
  max_volume: 72
  hide:
    controls: true
    name: true
    icon: true
    info: true
    power: true
    source: true
    mute: true

That’s a great solution, just making a ‘volume’ card will work for me, thanks!!!

1 Like

hello, fisrt of all just wanna say im completely in love with this mode, works as a charm!!! Thank you so much.

The only thing seems not working for me is the progress bar for some reason

Other thing i created some buttons for my playlists which are working perfect but would be awsome to see which playlist is playing 
 if any. Like changing the color of the button, any idea?

1 Like

Hi, in order for the card to calculate and display the progress your media player component has to expose the following three attributes media_duration, media_position and media_position_updated_at. You can check if it does by navigating to /dev-state.

Don’t think it’s possible to implement, at least not with the Spotify component, since there is no way of knowing which playlist is currently playing.

none of those are enabled, don’t know how to enable them

Okay, you can’t manually enable those unfortunately, the specific media player component has to have support for those attributes and if it does, they will be exposed by default.

The cast component do expose them for example.