Dynamic icons and icon colors

Why do I have to use custom-ui to have dynamic icon/icon colors for an existing entity?

It would be nice if it could be possible to use other’s entity state

YES! Pleeeeeaaaaassseeeee bake this into HA.

Yes, I don’t want to use custom-ui to make an icon template. I think if there was a utility in customize which sets the icon based on states we would get what we want:

state_icon:
  'on': mdi:xxxx
  'off': mdi:yyyy
  default: mdi:zzz
state_icon_color:
  'on': rgb(255, 255, 255)
  'off': blue
  default: #224F42

worse case scenario is that this is implemented in Lovelace. But it makes sense to have this implemented in the backend so that all of Lovelace has the same values and doesn’t need to be configured on an individual basis.

4 Likes

Agreed, this is my number 1 annoyance

I didn’t know that custom ui still worked.I thought this was deprecated awhile ago.

It’s hanging by a thread

which thread is that? (like to be prepared, and working perfectly for now here, heavily using custom-ui…)

btw if you are thinking of adding a systemwide Lovelace way to customize icons and color (pleeeease do), dont forget the templating of those…

what you write here:

is still so very hard-coded, though admitted, a beginning.

Well, any frontend change has broken it… how many times now? There’s no developer to pick up the task of keeping it alive. So IMO it’s hanging by a thread.

1 Like

a well, ok. I was only truly broken once… but it was undressed a few times :wink:

thought for a moment you knew of an upcoming further demise. One of the reasons I always have a beta system running is to see of it is safe to update my main production system, with custom-ui in action.

for now it still is, up to 115.0b11

There is an ugly way to do this if you want, it is to create template switches/lights/sensors for each of them and define an icon for each state (not nice I know, but at least is core and will likely to continue working even years from now).

But admittedly it isn’t the nicest thing to do.

icon_color simply isn’t supported by HA core. we need custom-ui for that.

I have shunned away from custom-ui for this very reason. And the only feature I needed was to be able to template in customize.yaml. but unfortunately it will load the entire package (of which the customize.yaml part is only a small part of).

True, I use button-card so icon color isnt a problem for me, I also use dbuits popup cards and they show the actual color of the icon as well. Though true when looking at it through the developer-tools it wont show indeed. I personally don’t care that much since I don’t use the backend very often anymore.

But I understand though, you already know I used custom-ui in the past :rofl:

Hahah, I also have a staging area just for customize-ui testing on new releases to make sure things don’t fall apart. I don’t think i can stop using it since I have about 20 different colors and icons overrides in my customize global file.

yep, and don’t even begin to talk about the complexity of all those lovelace card mods compared to the lean CU templates. Don’t get me wrong, I love card-mod. But the easy and power of CU is second to none, and should really be incorporated. Instead of talked down.

speaking of CU, we’ve been able to fix 2 issues: the long standing e.push error was fixed by @supremesports and the need for a new More-info filter on HA 115 was updated by @cab426 .

so we’re still good :wink:

1 Like

Where can I find that code, looked in the repo but didn’t see any forks? My custom-ui is very very broken :sob:

please go here: https://github.com/Mariusthvdb/custom-ui

2 Likes

Thank you very much! Saved my day.

Omg thank you!! Now if only it can be cleaned out to get rid of all the other stuff that’s no longer is needed. . …and then move it all to the core :joy: