Welcome to the community!
Does your fan have any sort of remote control capability?
If so you might be able to integrate it for speed control with a Broadlink RM4 Universal Remote Control using the community app.
And then set up some rules with a ZEN32.
As easy as pie.