Lovelace: Mini Media Player

Hi,

I try to control a number of radio channels via chortcuts, can’t find what I am doing wrong here.
The channels do switch via the standard pull down menu.

Can someone help me out here ?

radio

artwork: cover
entity: media_player.marantz_nr1510
idle_view: when_idle
info: scroll
max_volume: 100
name: Radio
shortcuts:
  align_text: center
  buttons:
    - id: 'http://icecast.vrtcdn.be/mnm-high.mp3'
      name: MNM
      type: channel
    - id: 'http://playerservices.streamtheworld.com/api/livestream-redirect/JOE.mp3'
      name: JOE
      type: channel
    - id: 'http://playerservices.streamtheworld.com/api/livestream-redirect/JOE.mp3'
      name: 90's
      type: channel
    - id: 'http://icecast.vrtcdn.be/stubru-high.mp3'
      name: Stu Bru
      type: channel
  columns: 4
sound_mode: full
type: 'custom:mini-media-player'
volume_stateless: false

Recent changes have made this card different from every other card in my theme. The volume slider in particular. I managed to get the slider button and active side back to normal by setting this in my theme:

mini-media-player-accent-color: "var(--paper-slider-knob-color)"

However the inactive part of the slider is still different. I don’t seem to be able to find the theme variable to change this:
Screenshot_2020-08-05 Administration - Home Assistant

Normal slider for comparison:

Screenshot_2020-08-05 Overview - Home Assistant

Edit: answering my own question. it seems to be:

mini-media-player-overlay-color:

Screenshot_2020-08-05 Administration - Home Assistant(1)

it would be really nice it this card’s theme options lined up with home assistant’s. Especially considering the new class option coming for card mod 2.0.

1 Like

thank you. was exactly searching for the same

That’s not an intentional change, thanks for letting me know.

What else is different?

Right now I have the text color set to white with artwork as a full-cover. But with white artwork, the text is unreadable. Is there a way to have adaptable text colors for other art work styles as well (like with the new material one)?

Ah, glad to hear it.

My card is pretty minimal, so I’ve only noticed the chevron for the drop-down source list and the volume slider. Both were set to accent colour.

1 Like

About my last post concerning no refreshing of the card i show you two screenshots i actually see on my UI Frontend. The music is stopped maybe one hour ago but as you see the cards still show the artwork and the title track and also the play button is always on (and it remains on also i i press it to go off).
Using the internal UI reload nothing change… Only a chrome reload or a clear cache will solve this…

Schermata 2020-08-07 alle 14.09.02

Do you think it depends from your card or from other causes?

I have a quiestion about idle_view. I dont think I understand it,or my other config options are overwriting it.

I have one sonos speaker. When playing I display the full artwork, taking up a good amount of space, and I like that. When I stop playing music, and it’s paused. I want to go to the normal, small player.

Right now it stays on the last source and displays the artwork.

Here is my config

artwork: full-cover
entity: media_player.living_room
hide:
  icon: true
  name: true
  next: true
  power: true
  power_state: true
  prev: true
  source: false
  volume: true
info: scroll
source: full
idle_view: true
consider_pause_idle: true
consider_idle_after: 30
type: 'custom:mini-media-player'

Hey folks, I’m fairly new to home assistant and stumbled across this in hacs. I’m struggling with the install. The files are in the right place (see below)

[root@hothserv1 mini-media-player]# pwd
/opt/home-assistant/www/community/mini-media-player
[root@hothserv1 mini-media-player]# ls
mini-media-player-bundle.js  mini-media-player-bundle.js.gz
[root@hothserv1 mini-media-player]# ls -ltrh
total 196K
-rw-r--r--. 1 root root 152K Aug  7 08:45 mini-media-player-bundle.js
-rw-r--r--. 1 root root  41K Aug  7 08:45 mini-media-player-bundle.js.gz

I set up the Resources for it. (note I tried both the suggested path during the install and the one where my other hacs lovelace ui mod is installed. Any help pointing me in the right direction would be much apprecited!

I keep getting these kinds of errors when trying to make my first card.

That’s not an error. It’s just saying you have to configure the player using yaml as there is no visual user interface to configure the card.

So I’m unable to add the mini-media-player from the manual method here? The guide kind of falls short at this step. The guide on the repo page is really good about telling me where things need to be up until getting to the card section.

No that is exactly what you do. You write a yaml config in a manual card.

Pretty sure this is unrelated to this card since the card isn’t caching anything at all, so a simple refresh should give you a “fresh start”, unless something has changed in HA and it’s now caching cards or something.
You can easily check if the card is the issue by taking a look at the media players attributes in developer tools, check the attributes and see if they match what’s shown in the card.

Your idle_view configuration is incorrect.
try this:

... rest of card config
idle_view:
  when_paused: true
  after: 30

Note: after in this configuration is redundant and can be removed since when_paused is already set to true and will render the idle view directly when playback is paused.

1 Like

Ok I think I figured it out thanks for your help @tom_l I was expecting to see exactly what I saw in the example so it didn’t really click in my head when I actually got it working. I’ve started playing with the card options and seeing elements appear so I’m pretty sure I have it working. Time to start tweaking it :slight_smile:

1 Like

The documentation is really poor (missing!?) for users in “non yaml mode”…
I’m not using the GUI to configure cards myself so if someone wants to improve the documentation I would be very happy :laughing:

Ok, i did a test and this is the result.

I play some music on my echo_show device and the attributes are:

After this i stopped the music (always using the card) and then i went to the developer/states and this is the result of the attributes of the same device:

As you can see nothing is changed after stopping the music and that’s what i posted. The card is still showing artwork and title track:

Schermata 2020-08-07 alle 20.03.44

And you can see also the card is showing the music playing also if i stopped it and no music is played in the device.
What do you think ?

EDIT: I noticed also the default media control card has the same behaviour:

Schermata 2020-08-07 alle 20.07.06

So i think now it depends directly from HA… I opened an issue regarding this but none is replying me…

EDIT: After 10 minutes stopping music the card is still showing is playing…

Schermata 2020-08-07 alle 20.09.53

Yep, it’s an backend issue then.

Hi
I keep getting ‘No card type found’

- entity: media_player.kitchen
  type: 'custom:mini-media-player'

If you are using the UI code editor (manual card) remove the dash and indentation.

entity: media_player.kitchen
type: 'custom:mini-media-player'
2 Likes

Ok, so now i hope my issue will be considered, but till now none care of it…
Can you do something about it?