Honestly this is where the issue came in. My entire house is smart except for my bathroom fans where we use dumb timers. They work flawlessly because there's no point in upgrading them to smart devices.
Something like this is all you need(ed).
These are nice! Also like to have the bathroom fan on a timer switch (like this).
If there is still stench or humidify in the room, just set it to run for a few minutes after you leave.
I had almost the exact same situation - bathroom ceiling venting directly into attic.
I live in WI, but put in an inline vent fan, using insulated flexible duct, vented out the gable end, with an aluminum vent with a flapper. The fan itself is a few feet from the bathroom ceiling, and maybe 5-6 feet from the gable end. I can barely hear when it is running. Because it is so silent, I put one of those timer switches in there.
Not this timer switch, but something like this - https://www.amazon.com/Enerlites-HET06A-White-1-5-10-15-20-30-Countdown-Decorator/dp/B00IB0ZJXE
Motion sensors are probably the best way to go, as others have said, but I'll offer a different alternative. This switch has a built-in timer that you can set for 1, 5, 10, 15, 20 or 30 minutes. There's also other timer switches out there, some of which can even be programmed.
I bought the Enerlites HET06A from amazon. Both my wife and my daughter tend to turn the fan on and then leave the house so this has been very helpful. https://www.amazon.com/gp/product/B00IB0ZJXE/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
Does it need to plugged into a receptacle, or would something that mounts into the wall like an actual light switch work?
​
if the latter, these may seem to do what you're asking
​
​
edit:
This device can be plugged into a receptacle
Deal link: Amazon
^^Note: ^^The ^^deal ^^may ^^have ^^expired ^^by ^^the ^^time ^^you ^^see ^^this ^^post.
Enerlites HET06A-White 1-5-10-15-20-30 Minutes Preset In-Wall Countdown Timer Switch, w Decorator Wall Plate, White https://www.amazon.com/dp/B00IB0ZJXE/ref=cm_sw_r_cp_apa_SU1bCbAY3VRAB
dude this has been done lol like, a loooong time ago
I put a pair of these in my house, they're great and pretty cheap.