IDo you use Rule Machine? That is how I’m controlling my fan. I set up rules for temperatures to set low, medium, high and off. That was long ago and Bruce has added a lot of functionality since then that would probably allow us to reduce it to 1-2 rules. Since my rules work I haven’t bothered to go back and rebuild them.
They are something like the ones below, just change the temps and speeds to suit your needs. Depending on your device controller you can set dimmer level or speed)
Temp >= 72
Action for true: fan fan low (or dimmer 20)
Action for false: fan off (dimmer 0 or switch off)
Rule 2 temp >=74
Action for true: fan medium (dimmer 55)
Rule 3 temp>76
Action for true: fan hi (dimmer 99)
I also think you can build complex rules or with the more recent releases of RM use rule actions and evaluate rules more effectively. Might want to ask some of the better logic guys in the rule machine logic thread.
Edit: when I use dimmer in my post that is the RM language. I’m assuming a fan control not a standard dimmer. It isn’t advisable to use a standard dimmer with a fan. However the ge fan control device type gets set with dimmer levels.