When Your Bathroom Starts a Sauna Without Asking: Smart Humidity Control with Home Assistant

Bathrooms are funny places. One minute it’s a calm, tiled sanctuary. The next, it looks like a tropical rainforest where someone forgot to install wildlife and moderation. Mirrors fog up, towels become emotionally damp, and the ceiling slowly develops what can only be described as “character.”

Advertisements

This is where automation steps in—not with judgment, but with a quiet digital intervention: turning on the fan before your bathroom becomes its own weather system.

This post walks through a simple but effective humidity-based bathroom fan automation using Home Assistant. It’s practical, cheap-ish, and slightly satisfying in the same way watching a kettle boil is satisfying—except now your house is making decisions for you.


Why humidity control actually matters (besides comfort and dignity)

High humidity in bathrooms is not just a cosmetic issue. When moisture levels stay elevated over time, you get:

  • Mold growth (the unwanted bathroom “pet”)
  • Peeling paint or damaged walls
  • Foggy mirrors that ruin your shaving confidence
  • Shortened lifespan of fixtures and finishes

A typical comfortable indoor humidity range is around 40–60% relative humidity (RH). In a bathroom after a hot shower, it’s not unusual to hit 80–95% RH, especially in smaller rooms.

Temperature also plays a role. Warm air (say 22–24°C) holds more moisture, and once it cools, that moisture condenses on surfaces. That’s when your ceiling starts looking like it’s crying quietly.

So yes, a fan helps. But a smart fan? That’s where things get interesting.


The basic idea: let sensors do the nagging

Instead of manually switching on a fan (which most people forget), we use a humidity sensor to detect when moisture rises above a threshold, then automatically activate ventilation.

And optionally:

  • Keep it running after showering until the humidity drops again
  • Avoid short cycling (fan turning on/off constantly like it’s confused about life)
  • Add temperature logic so it behaves intelligently in different seasons

This turns your bathroom from “reactive moisture cave” into a mildly well-behaved system.


Components you’ll need

Let’s keep this practical. No need to install a NASA control room.

1. Humidity & temperature sensor

You need something that measures:

  • Relative humidity (% RH)
  • Temperature (°C)

Common choices:

  • Aqara Temperature and Humidty T1
  • SHT31 / SHT30 (accurate and reliable)
  • BME280 (adds pressure too, if you enjoy overachieving sensors)
  • ESPHome-compatible sensor setups are ideal

Placed in or near the bathroom (but not inside the shower unless you enjoy replacing electronics).


2. Smart fan control

You need a way to switch the fan:

Advertisements

Options include:

  • Smart relay (e.g. Shelly 1 / Shelly Plus 1)
  • Z-Wave relay module
  • Smart switch (if your fan supports it)
  • ESPHome relay board (DIY friendly)

Important: make sure your installation complies with electrical safety rules. Bathroom wiring is not the place for “it should be fine” engineering.


3. Home Assistant

The brain of the operation.

Home Assistant will:

  • Read humidity values
  • Decide when to turn the fan on/off
  • Keep logic consistent and adjustable
  • Log everything so you can later obsess over shower patterns

4. Optional upgrades (for maximum nerd satisfaction)

  • Motion sensor (fan activates only when someone is actually in the bathroom)
  • Door sensor (detect shower sessions indirectly)
  • Energy monitoring (see how much electricity your fan uses—usually very little, but still fun)
  • Delay timers for “post-shower purge mode”

The automation logic (simple but effective)

We’ll define a few rules:

  1. If humidity rises above 70%, turn fan ON
  2. Keep fan running until humidity drops below 60%
  3. Minimum runtime: 5 minutes (to avoid rapid toggling)
  4. Optional: only run if temperature is above 20°C (to avoid winter false triggers from condensation spikes)

This creates a hysteresis effect—basically preventing the system from panicking.


Example Home Assistant automation (YAML)

Here’s a clean version you can adapt:

alias: Bathroom Humidity Fan Control
description: Turn on bathroom fan based on humidity levels
mode: single

trigger:
- platform: numeric_state
entity_id: sensor.bathroom_humidity
above: 70

condition: []

action:
- service: switch.turn_on
target:
entity_id: switch.bathroom_fan

- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.bathroom_humidity
below: 60

- delay: "00:05:00"

- service: switch.turn_off
target:
entity_id: switch.bathroom_fan

A slightly smarter version (because we can’t help ourselves)

This version avoids running the fan unnecessarily in cold conditions and adds temperature awareness:

alias: Smart Bathroom Ventilation
description: Humidity and temperature-based fan automation
mode: restart

trigger:
- platform: numeric_state
entity_id: sensor.bathroom_humidity
above: 70

condition:
- condition: numeric_state
entity_id: sensor.bathroom_temperature
above: 20

action:
- service: switch.turn_on
target:
entity_id: switch.bathroom_fan

- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.bathroom_humidity
below: 60

- delay: "00:03:00"

- service: switch.turn_off
target:
entity_id: switch.bathroom_fan

What about energy usage?

Most bathroom fans are surprisingly efficient. A typical unit might consume around 10–30 watts.

Let’s do a quick sanity check:

  • 20 W fan
  • Runs 1 hour per day
  • Monthly usage:
    → ~0.6 kWh per month

At European electricity prices, that’s not exactly breaking the bank. It’s roughly the cost of one existential crisis and a coffee.


Practical tuning tips

Real bathrooms are messy environments (in both senses of the word). Here are a few adjustments you might need:

1. Adjust thresholds

  • Small bathroom: trigger at 65–70% RH
  • Large or poorly ventilated: 70–75% RH

2. Add time restrictions

You may want to avoid running the fan at night if it’s noisy.

3. Add occupancy detection

Nothing more tragic than ventilating an empty bathroom for 30 minutes because humidity “remembered” someone was there.

4. Use smoothing

If your sensor is jumpy, average readings over 1–3 minutes.


Why this automation is secretly addictive

There’s something oddly satisfying about walking out of a hot shower and realizing:

  • You didn’t touch a switch
  • The fan already started
  • The mirror is less foggy than usual
  • Your house quietly “handled it”

This is the essence of smart home automation: not flashy AI assistants, but small invisible systems that prevent tiny annoyances from accumulating into daily frustration.

It won’t change your life. But it might slightly improve your bathroom experience, which is arguably more important than most life-changing things.


Final thought

Bathroom humidity automation is one of those perfect beginner Home Assistant projects: simple hardware, clear logic, immediate benefit.

And once you start automating bathrooms, it’s a slippery slope. Soon you’ll find yourself thinking:

  • “Should the mirror have a defogger?”
  • “Why doesn’t the towel rack have climate control?”
  • “Is this house emotionally damp?”

At that point, you’re one step away from building a fully climate-managed spa instead of a bathroom. Which, honestly, doesn’t sound like the worst outcome.


Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.