thomasloven / lovelace-template-entity-row

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

2022.12: by default an icon's color is same as for a "light" entity #94

Closed ildar170975 closed 4 months ago

ildar170975 commented 1 year ago

Consider this example:

type: entities
entities:
  - type: custom:template-entity-row
    name: name
    icon: mdi:cogs

There is no entity specified. And yet the icon's color is set like for a "light" domain: изображение изображение

alexives commented 1 year ago

@thomasloven I tried replacing light. in the js with binary_sensor. and that seems to have fixed it on my instance. Since no entity_id is specified, it uses the defaults in there that set the type to light which I guess as of 2022.12 now has some special styles for rgb lighting. I put up #96 that I think should fix this.

michalolborski commented 1 year ago

@alexives , did you try to manipulate state? I tried to have state: on/off/true/false and unfortunately icon always stays with default color (it should have active when on/true)

user514 commented 1 year ago

Always yellow now. Before last update, it works ok: as 'lime' when 'home' and grey when 'not home'...

wrong_color

color: >- {% if is_state('device_tracker.nox', 'home')%} lime {% else %} dimgrey {% endif %}

snhnic commented 1 year ago

Hopefully there will be a solution for the change they made

alexives commented 1 year ago

@alexives , did you try to manipulate state? I tried to have state: on/off/true/false and unfortunately icon always stays with default color (it should have active when on/true)

Ahh, you're right @michalolborski, I specify the secret color option, so the state issue isn't there for me. Looking at the css, it looks like it's not applying the active style to the item anymore.