Seeking Advice on Humidity-Based Bathroom Fan Automation

I’m working on a smart home project to automate the bathroom fans based on humidity levels, and I could really use some advice. I have two Xiaomi Aqara humidity sensors in my bathrooms and a Nest thermostat for monitoring indoor humidity. My goal is to have the fans turn on when the humidity in the bathroom exceeds a certain threshold compared to the main room, and turn off once it stabilizes.

I’ve set up a basic automation using numeric state triggers, but it’s not working as smoothly as I’d like. The fans sometimes don’t respond when the humidity spikes, and other times they turn off too quickly. I’m wondering if there’s a more reliable way to calculate the humidity differential or if I should consider adding a delay before the fan turns off.

Here’s a quick overview of my current setup:

  • Master Bathroom: Sensor reads humidity and compares it to the Nest thermostat. If the difference is above 20%, the fan turns on. It stays on for 15 minutes before checking again.
  • Shared Bathroom: Similar setup with its own sensor.

I’m curious if others have tackled similar projects and what approaches they’ve found successful. Any tips or alternative methods would be greatly appreciated! :pray: