Jinja template not being parsed in dashboard

Hello!
I’m trying to use Jinja templating in a dashboard, but the jinja template is never parsed, I’m not really understanding what I’m doing wrong.

To simplify, I’ve created an empty dashboard, and added this (the real use case is to change the icon color according to the status, I’m using this as a simplified example):

views:
  - title: Home
    cards:
      - type: custom:mushroom-chips-card
        chips:
          - type: entity
            entity: person.jduro
            icon_color: '{{green}}'
        alignment: center

As you can see in the screenshot, I’ve inspected the element in the browser and the jinja code is still there, shouldn’t the Home Assistant process that code and the result be something like:

--color: green

Thanks in advance!

Entity chips don’t have template colors, you need a template chip if you want dynamic colors… You can stay with the entity chip if you want a static color.

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: person.jduro
    icon_color: green
  - type: template
    entity: person.jduro
    icon_color: '"{{ iif(is_state(entity, 'home'), 'green', 'red' ) }}"'

type: template

Reference: Template Chip


EDIT

ninja’d by Didgeridrew

Can you guys please explain me why this works:

I’ve tried to replicate that and I can’t!

It doesn’t look like it is working… all those chips are grey even though they should have colors. The example directly below the one linked is appropriately colored and uses template chips.

Using the custom:mushroom-template-card, correct?
Makes sense!!

Thanks @Didgeridrew

No. Use a Chip card and set its type to template.

As Taras said use Template chips. The following is a patial version of the one you linked using the correct type of chip:

type: custom:stack-in-card
mode: vertical
cards:
  - type: custom:mushroom-person-card
    entity: person.jduro
    use_entity_picture: true
    hide_name: true
    layout: vertical
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        entity: binary_sensor.pixel_6_is_charging
        icon: mdi:power-plug
        content_info: none
        card_mod: null
        style: |
          ha-card {
            box-shadow: 0px 0px;
          }
        icon_color: |-
          {% set state=states(entity) %}
          {% if state=='on' %} green
          {% elif state=='off' %} yellow
          {% else %} red
          {% endif %}
      - type: template
        entity: binary_sensor.pixel_6_bluetooth_state
        icon: mdi:bluetooth
        content_info: none
        card_mod: null
        style: |
          ha-card {
            box-shadow: 0px 0px;
          }
        icon_color: '{{iif(is_state(entity, "on"), "green", "red", "grey") }}'
      - type: template
        content_info: none
        card_mod: null
        style: |
          ha-card {
            box-shadow: 0px 0px;
          }
        icon: mdi:battery-charging-{{ states(entity) }}
        icon_color: |-
          {% set state = states(entity)|int %}
          {% if state >= 75 %} green
          {% elif 40 <= state < 75 %} yellow
          {% else %} red
          {% endif %}
        entity: sensor.pixel_6_battery_level
    alignment: center

Ok, I understand now!
I thought we were able to use jinja templating in any type of card, I was a little bit mislead by that comment!

Thanks a lot, guys!