Nikkit logo NikkitSmart home, explained simply
Automation and Routines

Humidity Sensor Bathroom Fan Automation That Actually Works

Your bathroom fan either runs for two minutes and leaves the mirror fogged, or someone forgets it and it hums all afternoon.

A small white humidity sensor on a tiled bathroom wall beside a fogged mirror, with a ceiling exhaust fan above

Your bathroom fan either runs for two minutes and leaves the mirror fogged, or someone forgets it and it hums all afternoon. A humidity sensor bathroom fan automation fixes both problems by switching the fan on when the air gets wet and off when it is actually dry, with nobody touching a switch.

I have set this up in four bathrooms now, including one with no window and a fan that is older than my car. The hardware is cheap. The part people get wrong is the logic, so most of this guide is about the numbers that make it behave.

What you need for a humidity sensor bathroom fan

There are three pieces: something that measures humidity, something that switches the fan, and something that runs the rule between them.

  • A humidity sensor. A Zigbee or Thread temperature and humidity sensor costs 12 to 25 dollars. Aqara, Sonoff and Eve all make small battery models that last a year or more on a coin cell.
  • A smart switch for the fan. Replace the wall switch with a smart on/off switch rated for motors. Most fans draw under 1 amp, so a standard 15 amp switch is fine. Do not use a dimmer, because dimming a fan motor makes it buzz and wears it out.
  • A hub or app that supports conditions. Home Assistant, SmartThings, Hubitat and Homey all handle this well. The Alexa and Google Home apps can do a basic version, but they struggle with the comparison logic covered below.

If you would rather skip the wiring, some fans come with a built in humidistat. They work, but you cannot tune them, and the sensor sits right in the fan housing where it reads badly. A separate sensor gives you control.

Where to mount the sensor

Placement decides whether the automation works. Put the sensor on a wall about 1.5 to 2 meters from the shower, at roughly head height, and out of any direct spray. Inside the shower it gets soaked and reads 99 percent for an hour. Right next to the door it barely notices the steam until the room is already foggy.

Avoid the ceiling directly under the fan. Air moving past the sensor dries it faster than the rest of the room, so the fan shuts off while the mirror is still wet. The side wall opposite the shower is usually the best spot in a small room.

Add a second sensor outside the bathroom

This sounds like overkill, but it is the single upgrade that made my setups reliable. A second sensor in the hallway or bedroom tells the automation what "normal" humidity looks like in your home today. In January that might be 35 percent. In a humid August it might be 65 percent. Without that reference, any fixed number you pick will be wrong for half the year.

The rule that works: compare, do not threshold

Here is where most guides send you the wrong way. The common advice is "turn the fan on above 70 percent and off below 60 percent." I tried that first and it failed in both directions.

In summer the bathroom sat at 68 percent on a dry day, so the fan never shut off after a shower, it just hovered above 60 and ran for hours. In winter the room started at 30 percent and a quick shower only pushed it to 62, so the fan never turned on at all, even with a fogged mirror.

The fix is to compare the bathroom with the reference sensor instead of with a fixed number:

  1. Turn on when bathroom humidity is 10 or more points higher than the hallway sensor.
  2. Turn off when bathroom humidity drops to within 4 points of the hallway sensor.
  3. Hold for 2 minutes before each change, so a single noisy reading does not flip the fan.

The gap between 10 and 4 is called hysteresis, and it stops the fan from chattering on and off when the reading hovers near the edge. If you only have one sensor, a rate of rise rule is the next best thing: turn on when humidity climbs 8 points within 5 minutes. A shower does that. A humid day does not.

Rule typeTurns on reliablyTurns off reliablySensors needed
Fixed threshold (70/60)Summer onlyWinter only1
Rate of rise (8 points in 5 min)YesNeeds a timer backup1
Difference from hallway (10/4)YesYes2

Safety limits and manual control

Every automation that runs a motor needs a ceiling. Add a rule that switches the fan off after 60 minutes no matter what the sensors say. If a battery dies or a sensor drops off the network, the last reading freezes, and a frozen 90 percent will keep the fan running until someone notices the noise at 3 a.m.

Keep the wall switch working as a normal switch. If someone presses it, the fan should run, and your rule should take over from there. I give a manual press a 20 minute run time, which covers people who use the fan for smells rather than steam. The house has to work when the clever part does not, which is the same idea behind the three automations worth setting up before any others.

Finally, add a low battery alert for both sensors, but send it once a day at most. A fan rule that nags you is a fan rule you will delete. If your phone already buzzes too often, read how to keep smart home alerts under control before adding more.

Tuning it over the first week

Look at the humidity graph after a few showers. You should see a sharp rise, the fan kicking in within a minute or two, and a slow curve back down over 15 to 25 minutes. If the fan turns on late, lower the "on" difference from 10 to 8. If it switches off while the mirror is still fogged, tighten the "off" gap from 4 points to 2.

A small bathroom of about 5 square meters with a 50 CFM fan usually clears in 15 minutes. A large ensuite with a weak fan can take 40. That is not a fault in the rule, it is a sign the fan is undersized, and no automation fixes that.

Once this runs quietly for a week, it is worth pairing with the other routines in our automation guides, such as having the bathroom light dim at night while the fan still responds to humidity.

Frequently asked questions

What humidity should a bathroom fan turn on at?

There is no single right number, because normal indoor humidity changes with the season. A better trigger is 10 points above the humidity in the rest of the house. If you must use a fixed number, 65 to 70 percent works in winter but will run too long in a humid summer.

Can I use a smart plug for a bathroom fan?

Only if the fan plugs into an outlet, which most ceiling fans do not. Hardwired fans need a smart wall switch rated for motor loads. Never put a plug-in device where shower water can reach it.

Do humidity sensors work in a steamy bathroom long term?

Yes, as long as they are kept out of direct spray. Expect a reading drift of 2 to 3 percent after a year or two, which the comparison rule handles well because both sensors drift slowly. Replace the coin cell once a year and the sensor should keep going for many years.

JP
Jonah Pryce

Jonah builds home automations far more complicated than any household actually needs, purely for the challenge, then writes the stripped down version that works for everyone else without the troubleshooting headaches.

More posts by Jonah

More in Automation and Routines

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto ankertoto