Icon_template for sensor

I am so used to creating icon_templates through custom-ui and/or for template sensors base on another entity, I completely forgot (and can’t find it in the docs) how to template an icon for the sensor itself:

have this template sensor now:

sensor:
  vijverpomp:
    friendly_name_template: >
      Vijverpompen {{'mogen uit' if states('sensor.br_temperature')|float < 6 else 'moeten aan'}}
    value_template: >
      {{ states('sensor.br_temperature')|float <= 6 }}
    icon_template: >
      {% if is_state('sensor.vijverpomp' ,'True') %} mdi:engine-off-outline
      {% else %} mdi:engine_outline
      {% endif %}

customize:

sensor.vijverpomp:
  state_card_mode: badges
  templates:
    unit_of_measurement: ${entities['sensor.br_temperature'].state}

which writes the full sensor in the icon_template. That shouldn’t ne necessary shouldn’t it? can’t wrap my head around it though, please have a look?

56