4 Switchs as 3 speed fan

I have a 3 speed desk fan that i have rewired though a sonoff 4 channel.
I want to be able to use a more logical fan lovelace and google control.
Should i use the switch as x integration or a template to convert the 1,2,3,4 switches into off , low, medium, high speed

I’d use a fan template