Humidity Sensor triggering Bathroom Vent

Hey guys! I’m fairly new to home assistant and still struggling with the more complex automations. I’m looking to create an automation that triggers my bathroom vent when the shower starts, and turns it off when the humidity is back to normal. I’m also wanting the fan to stay on for 10 minutes after someone leaves the bathroom if it is turned on manually(maybe 10 minutes after lights are turned off if turned on manually?).

I have another humidity sensor in another bathroom and one in the living room so it might be nice to use an average of these 2 to trigger the automation(if the master bathroom is a certain percentage higher than the average of the other 2 sensors, the automation will trigger). Another option would be it triggering if the humidity is raises rapidly. Any insight on the best option to trigger this? Would love to see these options written out. Thanks in advance!

You might find this useful

That would work for turning it on. But presumably, with the fan running, the humidity will drop more slowly.

I like the idea of basing the on/off decision on the reference value in the living room. I have a “problem” bathroom fan vent which will freeze shut if I turn the fan off before it has removed enough humidity, so I’ve given some thought to how I would implement this. You can’t use an absolute humidity value, as the ambient humidity changes. You need a reference point, preferably one which is a fairly stable indicator of the ambient indoor humidity. That lets you derive, to coin a phrase, a relative relative humidity between the bathroom and the reference.

I’m following this, please let us know how this works out for you!