I’m relatively new to HA and still learning as I build out my system. I know that it is possible to change the icon color based on the state of an entity, but I am trying to figure out how to change the color based on the state of a different entity.
To put this in perspective, I have an ecobee thermostat with multiple smart sensors that report temperature and occupancy to determine which rooms should have the temperature prioritized (only worry about the temperature in the occupied rooms). I have these values displayed on a glance card on my dashboard, but I would prefer if the icon would change color based on if that sensor is reporting the respective room is occupied or not.
You can either use card_mod and templates to use the state of another entity to adjust the color of your glance card entities, or use a different card entirely that allows you to directly use a template to define the color, like custom button card. There may be other options, but the main point is that you’ll need to use a template to define the color, and most native cards don’t support them.
Good day to everyone, sorry but i not abe to fully understand how to apply what you say to my case.
My case:
I would change color according to range of consumption of my devices.
here is the actual tile for example:
Tnx i found the main card-mod thread, but i dont find any similar case… (probably i cannot understand) can you please point me an example or devlop my own example?