How to Automate Bathroom Exhaust Fan Based on Humidity and Timer

Hey everyone, I’m looking for some advice on setting up a bathroom exhaust fan automation. I have a Panasonic WhisperWarm fan controlled by a Lutron Caseta 6-amp switch, and I also have a Sonoff humidity sensor in the bathroom. Right now, I have a simple Node-RED automation that turns the fan on when humidity exceeds 60% and keeps it running until it drops below 55%. But I’d like to add a couple more features to make it more efficient and user-friendly.

Here’s what I’m aiming for:

  • Manual Override with Timer: If someone manually turns on the fan (like when my son uses the bathroom), I want it to automatically turn off after 45 minutes. This way, we don’t forget to turn it off later.
  • Extended Runtime for High Humidity: If the humidity is high (above 60%) and rising, I want the fan to stay on even after the 45-minute timer expires. This is especially important if someone takes a long shower.
  • Outdoor Humidity Check: I also want to account for outdoor humidity levels. If it’s extremely humid outside and the overall home humidity is above 55%, the fan shouldn’t run because it won’t effectively reduce moisture levels.

I have other humidity sensors in the bedrooms on the second floor that I can use as a reference for outdoor humidity. I’m not sure how to incorporate this into the automation, though.

If anyone has experience with similar setups or can suggest a Node-RED flow that would handle these conditions, I’d greatly appreciate it! Thanks in advance for your help! :slight_smile: