Mushroom chips card doesn't change colour

I’m trying to change the color of this chip cards but it doesn’t work:

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: sensor.m2007j22g_battery_level
    use_entity_picture: true
    icon_color: "{{ 'green' if states('sensor.m2007j22g_battery_level') > '20' else 'red' }}"

Where is the issue?

Hello, you want change the color of the icon ?

type: custom:mushroom-chips-card
chips:
  - type: template
    icon: >-
      {{ 'mdi:battery' if states('sensor.battery_level') > '20' else
      'mdi:battery-20' }}
    entity: sensor.temperature_salon
    icon_color: "{{ 'green' if states('sensor.battery_level') > '20' else 'red' }}"
    content: "{{ states('sensor.battery_level') }}%"
    picture: ""
1 Like

Perfect. It works.
But when battery level is = 100, the icon is red, why?