Iâm trying to use card-mod to colour the background of entities on a glances card. I plan to adjust background colour according to temperature (havenât done that bit yet). I would like to adjust padding and margin, but notice that only some of these settings donât take.
Thanks for the quick response @eggman, but that doesnât seem to be the answer. All of the examples I have seen are without quotes. In any case - trying it in my cases didnât make any difference.
Ah, yes - usually that parameter is a string value of an entity id, I hadnât realised it could also be a variable referring to the current entity in a card.
OK - I think I see what you mean - I think Iâve misunderstood the use of config.entity.
I had hoped it would allow me to set some dynamic CSS (eg set colour based on temperature) at the card level, which would be applied to each entity in turn at render time. But I think you are saying that I must do this at the entity level, which means reentering the same dynamic CSS code for each entity. A little verbose, but I guess it gets the job done.
Since HA 110 changes the way it handles icons, the âoldâ custom-ui way of customizing icon_color doesnt work anymore. Which is a major bummer, since custom-ui was able to customize entities globally, and every where in HA these entities are displayed with their customizations. Any card, be it custom or core, and, importantly, in the more-info.
Did file a feature request to please add a new way of customizing entities in Ha core Frontend, but that will be a long shot I fear.
So, trying my best to customize icons with whatâs available right now, and using your card-mod Style of course. But, that only styles the entities in a Lovelace card, and not their more-info, as the quote above already indicates.
Iâve managed to template the icon color in an auto-entities card and would really have that functionality used in more-info. Which, without the color, in fact will be a Less-info from Ha 110 onwardâŠ
Since your answer above was a long time ago (talking Ha development time), I was wondering if you know of a way yet to globally customize items, so the more-info on the entity is also customized?
If not, could you give me a pointer what to look for in the âoldâ custom-ui, and what has been changed in the 110 HA icon handling, so I can try to adapt that script to that? I havenât been able to find that in the GitHub.
thanks for having a look.
youâre not alone, I am faced with a burden alike, while things could be so much simpler. Were simpler evenâŠ
EDIT: just to keep things tidy: my issue above has been resolvedâŠ
on your repetitive job: isnât a yaml anchor an option for you?