thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Wrong color on active false/true #45

Closed emufan closed 3 years ago

emufan commented 3 years ago

If I use active: false or true, the template-entity-row sets hard theses styles(-attribute) to the row-icon:

<state-badge class="pointer" style="--paper-item-icon-color: var(--paper-item-icon-active-color, #fdd835); --paper-item-icon-active-color: var(--paper-item-icon-active-color, #fdd835);" icon=""></state-badge>}

and/or

<state-badge class="pointer" style="--paper-item-icon-color: var(--paper-item-icon-color, #44739e); --paper-item-icon-active-color: var(--paper-item-icon-color, #44739e);" icon=""></state-badge>

and not the theme colors. Wanted? Error only on my side?

Without actice-parameter, everything is fine and not overwritten:

<state-badge class="pointer" style="" icon=""></state-badge>

domolys commented 3 years ago

Same for me,

It's using the default theme colors

fanaticDavid commented 3 years ago

I have noticed this issue too. I use a slate theme, and the active/inactive icon colors don't match the other icons in my UI. The active/inactive icon colors seem to be hardcoded to match the default light/dark theme, instead of following the theme defined by the user.

nickdos commented 3 years ago

I was just trying to debug this as well. Definitely NOT using the paper-item-icon-color colour set by my theme - seems hard-coded to the default theme version. Please fix this.

thomasloven commented 3 years ago

Please try version 1.2.0

fanaticDavid commented 3 years ago

With version 1.2.0, all template entity rows show no more icon. I tried switching to the default theme, to no avail. I also logged into HA using a private window and accessed it directly (= using the local IP address instead of going through my reverse proxy), but the end result was the same.

I reinstalled version 1.1.2 and the icons came back, straight up.

nickdos commented 3 years ago

I'm also seeing missing icons in Lovelace. As a work-around, I've had to add a hard-coded icon: "mdi:foo" to my Lovelace yaml. It was previously picking up the icon attribute from the "parent" entity but this is now broken in 1.2.0 for me.

thomasloven commented 3 years ago

The icons should be back in 1.2.1

fanaticDavid commented 3 years ago

I just updated to 1.2.2 and it's looking good for me! Thank you so much!

emufan commented 3 years ago

Please try version 1.2.0 It's working.