Hi,
I 'm new here.
I try to change the rotation speed of the fan icon in a custom button card.
But my if_else is not working.
- animation: |-
[[[
if ({{state_attr('fan.woning_fan', 'percentage')}} == 100) return 'rotating 1s linear infinite';
if ({{state_attr('fan.woning_fan', 'percentage')}} == 50) return 'rotating 2s linear infinite';
else return 'rotating 5s linear infinite';
]]]
What i’m doing not right ?