kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.47k stars 206 forks source link

Icon state color is wrong #759

Open Hackashaq666 opened 1 year ago

Hackashaq666 commented 1 year ago

Hi, I am using the mini-medi-player for all of my media players and it is great! I have noticed that the icon state color is not showing the correct color when the entity is on. The accent color of the default or custom themes seems to be ignored, and the active icon always shows as white (amber is my theme setting). The mediaplayer "off" color is correct (blue-grey in my theme). The standard media player card shows the "on" state correctly (amber in my theme). Is this a bug, is the card pulling in the color from incorrectly from the theme? (I don't see a setting for the icon "accent" color available in the additional theme variables for the mini-media-player card either.) Thank you!

I have set the parameter in the config to show the icon state:

  - entity: media_player.speaker
    type: custom:mini-media-player
    group: true
    hide:
      play_pause: true
      icon_state: false
Hackashaq666 commented 1 year ago

Here you can see the mini-media-player on top and the standard meda-player on bottom, the color should be amber for both when on.

IMG_0115

nilsreiter commented 10 months ago

I noticed the same thing, and developed this workaround using card_mod:

card_mod:
  style: |
    {%if is_state(config.entity, "playing")%}
    ha-icon {
      color: var(--accent-color);
    }
    {%endif%}
nilsreiter commented 10 months ago

--state-active-color is probably the better option