WTH don't we have dynamic icon colors?

Why The Hack is it so hard to customize the icon and color of an entity to reflect the state of the entity? :art:

Many entities (such as light, battery) already change the icon and color depending on the state.
The gauge card already has a mechanism to define colors based on the range of a sensor. It would be nice to have a similar mechanisme to specify the icon and color of an entity myself using the UI.

There are two places to define a custom icon and color which come to mind:

  1. Define state-based icons and colors on the entity itself.
  2. Configure state-based icons and colors in the dashboard card.

To further optimize the workflow, some form of “templates” for a certain type of entity would be nice.
For example:

  • define a “temperature” template with the icon and color for a sensor entity:
   0: color:cyan,      icon: "mdi:thermostat-low"
  10: color:red,       icon: "mdi:thermostat"
  20: color:"#8B0000", icon: "mdi:thermostat-high"
  • for any indoor temperature sensor, simply choose the “temperature” template and the predefined icons and colors will be used.

image
source: https://youtu.be/ClxxjLSZZMw?feature=shared

Personally, I like to use colors on my dashboards to more quickly absorb information, but it’s tedious to setup. There are numerous forum discussions and guides on how to do this using card-mod, templates, and other custom integration.

Dont forget HA has themes, and state-colors in those themes. For many device_classes you can define your colors and have the Frontend use those.

I am aware this is still very limited, but you didnt mention it, and maybe you can at least use those to decrease the need for customization a bit.

other than that, I agree, and have this open for 2 years now…

there are many other WTH’s so maybe we should gather them and merge…
I specifically mention this too on a custom device_class

there is so much demand for this…

I considered opening a WTH again this year but didn’t waste my time. As useful as it would be, it’s never going to happen.

1 Like

yeah, I fear that is the case.

That’s why I am reading all of the Outlooks/Roadmaps for better customization of the Frontend with increasing skepticism.

I didn’t mention it because I wasn’t aware of it. The theme would be a good solution direction for the template suggestion.

Thanks, I learned something new.

1 Like