Hi
Until recently (2 or 3 HA updates back I think) I had sensor cards like:
- entity: sensor.sdm230import
graph: none
state_color: true
icon: 'mdi:import'
name: Import
style: |
:host {
--paper-item-icon-color:
{% if states.sensor.import_power.state|int > 0 %}
red
{% else %}
rgb(138, 185, 45)
{% endif %}
;
type: sensor
and the colour of the icon would change according to the if condition.
Why is this not working anymore?