Mushroom Chip card not changing color from state change

I am trying to configure a template card with a mushroom chip card… I followed the guide that was on youtube from My Smart home…@ https://www.youtube.com/watch?v=pQkOaH44Dzo

The state changes for all tab selections but the tab colors remain default.

Any help is appreciated… Code is below.

  - type: vertical-stack
    cards:
      - type: custom:mushroom-chips-card
        chips:
          - type: template
            icon: mdi:fan
            content: HVAC
            card_mod:
              style: |
                ha-card {
                  --chip-background: {{ 'green' if is_state('input_number.tabs_home'), '1.0') else 'red' }}
                }
            tap_action:
              action: call-service
              service: input_number.set_value
              target:
                entity_id: input_number.tabs_home
              data:
                value: 1
          - type: template
            icon: mdi:lightbulb
            content: Lights
            card_mod:
              style: |
                ha-card {
                  --chip-background: {{ 'green' if is_state('input_number.tabs_home'), '2.0') else 'red' }}
                } 
            tap_action:
              action: call-service
              service: input_number.set_value
              target:
                entity_id: input_number.tabs_home
              data:
                value: 2
          - type: template
            icon: mdi:car
            content: Cars
            card_mod:
              style: |
                ha-card {
                  --chip-background: {{ 'green' if is_state('input_number.tabs_home'), '3.0') else 'red' }}
                }
            tap_action:
              action: call-service
              service: input_number.set_value
              target:
                entity_id: input_number.tabs_home
              data:
                value: 3
          - type: template
            icon: mdi:baseball
            content: Sports
            card_mod:
              style: |
                ha-card {
                  --chip-background: {{ 'green' if is_state('input_number.tabs_home'), '4.0') else 'red' }}
                }    
            tap_action:
              action: call-service
              service: input_number.set_value
              target:
                entity_id: input_number.tabs_home
              data:
                value: 4
        alignment: center

what colour are you getting? If it is always ‘red’. try 1 not 1.0

or you can try:

`{{ 'green' if is_state('input_number.tabs_home')|round(1), 1) else 'red' }`

…you can change round(1) with float(1) if you want it default to green when the sensor is unavailable or set it to anything else for it to default to red when unavailable.

Caveat: I don’t use card_mod

It is staying black… or the theme background… no changes at all…

I changed it to 1… no change either.

It works for me.

Can you put the following in developer tools ➜ template and share the output?

{{ 'green' if is_state('input_number.tabs_home','1.0')|float(0) else 'red' }}
{{ states('input_number.tabs_home') }}