Wrong template?

What is wrong in this template customization?

    friendly_name: TV LG
      icon: >
        if (state === 'on') return 'mdi:television';
        return 'mdi:television-off';
      icon_color: >
        if (state === 'on') return 'rgb(251, 210, 41)';
        return 'rgb(54, 95, 140)';

I cannot have this working properly.

you have custom-ui installed? without that this won’t work.

Yes, i have it installed. How to check if it’s properly installed?
And if not installed how to have the check of the status for changing icon and color?

click on dev-info and it should say the install:


Ok i have it installed but i had an old version … now i upgraded to the last… i need to restart HA to have it working again?

you guessed correctly…

Ok, thanks…