I need a card with a colored background according to the entity value.
Changing Icon or text colors seems rather easy but for a conditional background i found no working solotions.
My use case should be a card showing the temperature difference between inside and outside, enhanced with a background form red to blue for a quick indication for looking from afar.
It might work with card mod and templates, but until now id did not get it working.
I wonder if this is not a feature desired / used by more people?
“Changing Icon or text colors seems rather easy” - what card are you talking about?
In general, changing CSS attributes conditionally can done by card-mod.
Suggest to ask all card-mod related questions in the main card-mod thread.
And in that main card-mod thread show your attempts which are failed.
I understand that the card-mod thread is a good point to ask questions about anything card-mod related. I will post my question there as well, including my config (entity card for testing atm.).
Two reasons i ask in a separate thread:
a) as a feature question / wish if this functionality can be archived more easily without extra tweeking, maybe in future versions of regular cards ?
b) the card-mod thread is rather long and a specific question might disappear more easily, also at searches…
Hmmm, I think “Discussions” on Frontend GitHub could be a better place.
From other side, more card-mod adepts are subscribed to that main thread and will probably see your question. Besides, it is better to have solutions in one place than in 100500 separate threads.