FWIW, @velvetfoot, coincidentally there is a new commmunity bathroom fan automation app, just released today. It may or may not support what you need, but you could consider asking the developer if they can add a feature or two if it's close to what you want. Could be a nice clean solution for you.