piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Add Icon color option to cover card

werra11 opened this issue · comments

Is your feature request related to a problem?

I recently started using mushroom (and it's amazing!) and I noticed that for some reason changing the color of the icon in a cover card is is not possible. Even tough most other cards have that option.
It does actually display a different color when the curtains are opened. So in this case the standard blue.

Describe the solution you'd like

It would be amazing to be able to change the color of the icon. Just like with most cards.

Describe alternatives you've considered

No response

Additional context

No response

Hi! You can do this by using themes variables : https://github.com/piitaya/lovelace-mushroom-themes

mush-rgb-state-cover-open: var(--mush-rgb-blue)
mush-rgb-state-cover-closed: var(--mush-rgb-disabled)

Hi! Thanks for the insanely fast response. I did not know that and I'll add that, thank you! Is there any specific reason why this is set in themes and other icons are set in the card itself? I think it would still be great to add it to the card itself too.

Each domain has default colors and different rules. For example, alarm card has 4 state : armed, arming, disarmed and triggered. It's too much fields for the editor and the config.
For entity card, the icon is colored only if the entity is active. Only one color is needed. We can add it to the editor.

Also, themes allow you to define the colors for each domain and add consistency to your dashboard because all covers will have the same color for example.

That makes a lot of sense! Thanks for your answer :)