Bathroom Fan Timer Switch?

Could you use like a Leviton dimmer switch but not connect a load to the switch, instead connect like an Aeon microswitch to the fan as long as it can take the load. Put that up in the fan housing itself. Then when you turn the dimmer on to x percent it sets to x minutes of fan. So you could "turn up" the dimmer adding more LED dots to the little meter and that would extend the time. Then it would dim down.

So automate if the switch is on at all the fan is on. Then after you turn on the switch dim by one step ever 5-10 min and then each click of the dimmer adds say 5 min.