I have an Entities card from where I control the power to my radiators. Below is an example; I have several of theese.
If I set the “Color icons based on state?” toggle for the card, each icon is highlighted according to the state of the switch, which is what you would like in most cases.
I’m wondering however, if there is a way for the Entity card to set the icon highlight (not interested in a specific colour, the default will do just fine) based on a different attribute/sensor of that entity, like for instance if the current consumption goes above a certain level?
To be more specific; I’d like that the icon colour reflected wheter the radiator is currently drawing power (=is active) or not.
This way I could see at a glance if any of the thermostats are “not properly set”, i.e. if one of the radiators is pulling a higher load than the others.
This has probably been asked previously, but perhaps phrased in another way, which is why I may have missed the answer/solution. If so, please point me to the proper topic.
Below is one of the many approaches I have tried so far to no avail:
type: entities
entities:
- entity: sensor.ht_bastuloftet_temperature
- entity: switch.sl_h_dorr
state_color: true
- entity: switch.sl_v_dorr
state_color: true
- entity: switch.sl_h_fonster
state_color: true
- entity: switch.sl_v_fonster
state_color: {{ iif(int(states('sensor.bw_shp08_energy_current_3')) > 1, "true", "false") }}
- entity: sensor.bw_shp08_energy_current_3
title: Room heating
state_color: false