I wrote a smarp app to handle this. It calculates the humidity change rate and uses that to activate and de-activate the bathroom fan. I found that using that is more effective in practice than having a set threshold.
Smart Humidity Fan
4 Likes