Icon Colour By State

Hi I am very new to HA but I did some googling and youtube and came to this on the sensor.heating_heating entity

but the colour stays grey even though the heating is showing 100%, am i on totally the wrong track here, and should give up, or am i only slightly wrong

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: light.heater_plug
    icon_color: amber
    icon: mdi:fire
    name: Heater
    use_entity_picture: true
  - type: entity
    entity: sensor.lumi_lumi_weather_temperature
    icon_color: amber
  - type: entity
    entity: sensor.heating_heating
    icon_color: amber {% if is_state('sensor.heating_heating', '0') %} grey {% endif %}
    use_entity_picture: true
    content_info: state
  - type: entity
    entity: sensor.heating_temperature
    icon_color: amber
alignment: center

i tried this also these

- type: entity
    entity: sensor.heating_heating
    icon_color: >-
      {% if is_state('sensor.heating_heating', '0') %} grey {% else %}
      amber {% endif %}
    use_entity_picture: true
    content_info: state
  - type: entity
    entity: sensor.heating_heating
    icon_color: >-
      {% if is_state_attr('sensor.heating_heating', '0') %} grey {% else %}
      amber {% endif %}
    use_entity_picture: true

This should work, have you checked in the development tools-states that it actually shows 0?

General rule is to always use the development tools when templating.

no ill look into it thanks

the value is 0.0 but it still doesnt work

Does it work for all the other entity-chips ? ( .light .sensor.temp ) ?

Since you are comparing strings, the strings must be exactly the same.

{% if is_state('sensor.heating_heating', '0.0')%}grey{% else %}amber{% endif %}

A better way is to compare the values:

{% if states('sensor.heating_heating') | float == 0%}grey{% else %}amber{% endif %}

thanks for the replies but i think this is above my pay grade for the time being, i will come back to it after i have got a bit more advanced,

its amazing how much i have achieved so far with my automations, i have achieved more than i thought i could, couldnt be happier