Changing icon of Template Switch

I know this way! Thanks a lot!
I thought i can do without creating input_boolean.
If there is no other way to do it with yaml, i can make it eaiser with lovelace and “custom:button-card”
just like

            state:
              - value: 'off'
                icon: mdi:television-classic-off
              - value: 'on'
                icon: mdi:television-classic

Yes a Lovelace button should work with the the optimistic state (no value template).

I have chacked, it work!
But in all cases thanks for help!

1 Like