Lovelace: Mini Media Player

NEW RELEASE v1.0.2

Small update in preparation for HA v0.88.0.

I recommend everyone to update to this release, as all the buttons in the card will be broken in HA v0.88.0 otherwise.

Changelog

  • NEW: Added two theme variables

  • NEW: Option columns for shortcut buttons, to specify max amount of buttons per row (#78)

  • FIXED: Buttons to work with HA > v0.88.0 (#82)

  • CHANGE: Removed enforced uppercase for shortcut buttons (#74)

  • CHANGE: Changed color of media info when artwork is set to cover / full-cover

2 Likes

Can I use this card if I use the Lovelace GUI mode? There is no ui-lovelace.yaml file. Have I to create this file? Even if I use the storage lovelace mode?
Yes you can, you just need to add the resource reference to mini-media-player-bundle.js in the auto generated lovelace file stored in /config/storage/lovelace instead of adding it in ui-lovelace.yaml .

Thanks - this took me a while to find (perhaps it could be included in the github readme)

Thanks for your great work on the card

Or you just add it with the Raw config editor in the GUI.2019-02-20_13-22-42 2019-02-20_13-25-31

good to know - thanks

I don’t know if this is the correct thread but i am having problems with the spotify media player as it (in the list of source devices) shows always and only the echo devices, while the sonos one are never present in that list like the chromecast audio… Is this behaviour depending from the media_player.spotify or from the mini-media-player? I read that the devices will appear after they are powered and in fact the echo devices appear to me always on. How to make sonos and chromecast appear always on so they are listed by default in the available source devices?

It has nothing to do with this card, this card simply displays the source list exposed by the component, so it’s backend related.
You could try adding an alias for each device in your Spotify component configuration, as discussed here, didn’t solve the issue for me with my Chromecasts though.

Also, from a few posts ago:

Ok thanks… i’ll give a try to aliases and see if it works… BTW great card !

1 Like

@kalkih Jut wanted to say great work. Fantastic card for Sonos group control Thanks!

1 Like

Thank you @ronschaeffer, glad you like it :slight_smile:

When I start my radio via google home, BACKGROUND, ICON, and TEXT appear in the player.
When I run the same radio through the button, I do not have these things.

Can they also be displayed somehow? Radio is poured from tunein (button url also downloaded from tunein)

artwork: cover
entity: media_player.biuro
shortcuts:
  buttons:
    - id: 'http://217.74.72.11/rmf_fm'
      name: RMF FM
      type: music
    - id: 'https://zt.cdn.eurozet.pl/zet-tun.mp3'
      name: RadioZET
      type: music
    - id: 'https://ch.cdn.eurozet.pl/chi-net.mp3'
      name: ChillZET
      type: music
    - id: >-
        http://www.pldm.ml/radio.php?id=-1&url=http://www.eskago.pl/radio/eska-malopolska-zakopane
      name: Eska
      type: music
  columns: 4
show_source: icon
type: 'custom:mini-media-player'

Thanks for the clarification

The thumbnail and the station name is probably provided by tunein.

The shortcut buttons simply use the media_player.play_media service to start media playback, which grabs the provided url and streams it, the stream itself does most likely not contain any metadata in this case, and is why you don’t see any media information in your cards.

EDIT: if the stream actually contains metadata, it’s possible that it isn’t supported in the cast component through the default media receiver.

can you force a given icon and background (manual) for each radio station

No, not possible.

is it possible to configure it with the new version of lovelace ie from the fronted without working on the yaml?

Yes, check this out

There will be changes in the card regarding the new alexa_media custom component?

@Christian_Hollbjar:
Whenever I add your lines in the raw config editor I get an error message “unable to parse the yaml…”
"… bad indentation of a mapping entry in line 4 position 4.

title: Plexat
resources:

  • url: /config/www/mini-media-player-bundle.js
    type: module
    views:
  • panel: false
    theme: midnight
    badges:

Is something not working?

Please post your yaml Inside a code block, we can’t check if there’s anything wrong with your indentation otherwise.

perfect thanks