Icon color with custom-ui

homeassistant:
  customize:
    binary_sensor.garageoppnare_channel_1_input:
      templates:
        icon_color: >
          if (state === 'on') return 'red';
          return 'green';

Why doesn’t this line work? Tried to change the color of the icon.
Installed the new custom-ui:
image

show the state of the entity in dev tools? help us help you.