No need for occupancy sensor. I have mine set to turn on when bathroom humidity is both above 70%, and 10% greater than my living room humidity. It'll run a minimum 5 minutes, and then once the humidity is back within 10% of the living room, or below 68%, it'll shut off. It's been working great for over a year.
I also have it set to auto shut off 20 min after manually being turned on, but just before shutting down it checks the humidity to make sure it doesn't meet the above criteria. This avoids the event where you turned the fan on while dropping a deuce but then got in the shower right after - don't want the fan shutting down early. Also, if I ever manually turn the fan back on within 5 minutes of it auto shutting off, it will run for 10 min before shutting down vs the normal 20.
I'm using aqara temp/humidity sensors throughout the house. I'm not sure what the fan is, it's just a standard exhaust fan, but its controlled with a Kasa smart switch.
Rather than activate the fan over an absolute humidity threshold with occupancy, I’d recommend setting the fan to turn on when the room’s humidity is a certain amount more than the ‘normal’ humidity and ignore presence.
After trying and failing many times by using a normal humidity range to trigger the fan, I've been very happy with the Generic Hygrostat add-on available through HACS.
The problem with setting up "turn on the fan when humidity is above 65%" (for example) is that in the winter, when it's raining, etc... that might be the normal humidity inside the bathroom. Additionally, if the same humidity is used to trigger the fan "off", the fan will likely cycle too frequently. This may or may not be a bother to you.
The Generic Hygrostat (apparently there's a different Generic Hygrostat built in to HA, but it is not as good, so use the HACS one), takes an average of recent readings and sets it as the target. It triggers the fan when the humidity rises above the average by whatever percent you set. So, if it's 65% humidity on average, it won't trigger the fan until (for example) 70%.
One other thing I struggled with was cheap humidity sensors. Inexpensive options seemed to top out around 80%, and were not very accurate. I've had better luck with a Bosch BME680.
All in all, this automation was the most difficult that I've tried to nail down so far. It's working well now, but the problems which I've mentioned above took a long time for me to work out!