There’re 2 ways that I figure out recently, the control will not be the switch but either via IR or RF.
For fan that control via IR, you can use zmote.
For fan that control via RF, I’m using Sonoff RF flashed with Espurna, then control them using http parameter. I’ll be posting the guide in next couple of day.