You can definitely use a simple sensor and then create an automate rule to turn on/off the fan based on the sensor.
Another way to control it would be to limit when it runs using a smart switch only, if you have access to RBoy Apps check out this SmartApp: