Short answer: the cheapest cure for a mouldy bathroom is not a bigger fan — it is knowing when the air is actually wet. Put a SONOFF SNZB-02D on a dry wall, let Home Assistant compute the dew point, and switch the extractor fan (or a dehumidifier on a Zigbee plug) on by humidity instead of by a 20-minute timer. The sensor costs about as much as two tubes of mould spray, pairs with Zigbee2MQTT or ZHA without a hub, and reports ±0.2 °C / ±2 %RH with an LCD you can read from the doorway. What it does not do is fix a cold bridge, a leaking roof or a fan that vents into the loft — so read the caveats before you order, and read the electrical section twice if your fan is on fixed wiring.

Why the 20-minute timer keeps losing

A timer fan solves a schedule problem, not a moisture problem. Two showers at 22:00, a long bath on Sunday, a wet towel on a cold rail — the humidity load changes every day, the fan runs exactly the same amount every time.

Meanwhile the thing that actually grows mould is not the relative humidity in the middle of the room. It is the humidity at the surface. Air at 22 °C and 70 %RH has a dew point around 16 °C; the grout on an external wall in January can easily sit below that. The moment a surface drops under the dew point, moisture condenses on it and stays there — and mould needs hours of that, not a spike. The WHO’s dampness-and-mould guidance is blunt about the outcome too: damp housing and mould are linked to respiratory symptoms and asthma, which is why “get the wall dry” is worth automating rather than eyeballing.

So the useful measurement is a pair: temperature plus humidity, from which you compute the dew point, and the useful control is “run the fan while the air is wet, stop when it is not”. That is a ten-line template sensor and two automations, not a new bathroom.

What we run in our own bathroom

Let’s be precise about what is tested and what is not, because this is a “health” topic and the internet is full of confident nonsense.

What is genuinely ours: a 46-device Zigbee network on Zigbee2MQTT feeding Home Assistant, template sensors and threshold automations that have to survive restarts and firmware updates, and the energy side of the house (which is where the plug below lives). That half of this guide is daily reality.

What is not ours: we have not rewired an extractor fan, and we are not going to pretend we spent six months measuring three bathrooms. The bathroom-specific parts — IP ratings, fan isolation, Part P in the UK, dew-point numbers — come from the device documentation, building-physics rule-of-thumb and electrical guidance. If any of that conflicts with your electrician, your electrician wins.

The sensor: SNZB-02D, and why I would buy it again

The SNZB-02D is boring in the way good sensors are boring: Zigbee 3.0, a CR2450 coin cell, temperature and humidity plus battery, an LCD that shows both numbers, comfort thresholds you can set on the device (it flashes a 💧 when humidity passes your limit — genuinely useful for the family, who will never open an app), and calibration offsets in Zigbee2MQTT for both temperature and humidity. It supports OTA updates through Zigbee2MQTT, which matters more than people think: SONOFF shipped a firmware that improved reporting behaviour, and you can install it without buying a bridge.

Option Claimed accuracy Display Zigbee2MQTT Best for
SONOFF SNZB-02D ±0.2 °C / ±2 %RH Yes, LCD Yes, OTA bathrooms, one listing for UK/DE/NL
Aqara WSDCGQ11LM ±0.3 °C / ±3 %RH No Yes smallest footprint, app-only reading
SONOFF SNZB-02 (no D) ±0.2 °C / ±2 %RH No Yes closets, plant rooms, hidden spots
ESP32 + SHT4x (DIY) sensor-dependent No Via ESPHome you want to choose the report interval

Accuracy claims are claims: ±2 %RH is the number on the datasheet, and a €20 sensor will not match a calibrated hygrometer. For “is the bathroom wet or dry” that is irrelevant. For “did the wall dry to 60 %” it is good enough. For scientific work, buy a reference instrument and calibrate with salt solutions.

One more thing in the table’s favour: the same ASIN is listed on amazon.co.uk, amazon.de and amazon.nl, so the same guide works in three markets without a fallback link.

The dew-point automation (the part that actually works)

This is the whole trick. First a template sensor — Magnus formula, the same approximation the weather services use:

template:
  - sensor:
      - name: "Bathroom dew point"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
        state: >
          {% set t = states('sensor.bathroom_temperature') | float(0) %}
          {% set rh = states('sensor.bathroom_humidity') | float(0) %}
          {% set a = 17.625 %}
          {% set b = 243.04 %}
          {% if rh > 0 and t > -b %}
            {% set g = log(rh / 100) + (a * t) / (b + t) %}
            {{ (b * g / (a - g)) | round(1) }}
          {% else %}
            unavailable
          {% endif %}

Then the two automations. On when the shower has actually made the air wet, off when it is dry again:

automation:
  - alias: "Bathroom fan on when air is wet"
    triggers:
      - trigger: numeric_state
        entity_id: sensor.bathroom_humidity
        above: 75
        for: "00:03:00"
    actions:
      - action: switch.turn_on
        target:
          entity_id: switch.bathroom_fan_plug

  - alias: "Bathroom fan off when air is dry"
    triggers:
      - trigger: numeric_state
        entity_id: sensor.bathroom_humidity
        below: 65
        for: "00:10:00"
    actions:
      - action: switch.turn_off
        target:
          entity_id: switch.bathroom_fan_plug

Why 75 and 65 rather than one number: hysteresis. A single threshold turns the fan into a relay chatterbox around the setpoint, and a bathroom fan that switches on and off every 40 seconds is worse than a timer. The 3-minute for: stops a brief spike (opening a hot dishwasher, a kettle) from triggering anything, and the 10-minute off-delay is what actually lets the walls dry.

If you want the surface-risk version, add a second temperature sensor near the coldest wall (or use an infrared reading once) and trigger on surface_temperature <= dew_point instead of a fixed humidity. That is the metric that predicts condensation; the humidity thresholds are the pragmatic approximation for people who are not going to tape a sensor to the tiles.

Hooking up the fan or the dehumidifier

Two honest paths, and only one of them is a five-minute job.

Path A — something that plugs in. A freestanding dehumidifier, a plug-in air mover, a heated towel rail on a plug: that is exactly what a Zigbee plug is for. The SONOFF S60ZBTPF is the one we use for switching loads like this: 16 A, energy monitoring so you can see what the drying actually costs, and because it is mains-powered it also repeats your Zigbee mesh. Check one thing before you buy: the dehumidifier needs a mechanical switch or an “auto restart after power loss” setting, otherwise it comes back dead every time the plug reconnects power. Which plug can actually carry that load is a separate question — we sized the amps and the metering in the best Zigbee plug for a dehumidifier. And give a compressor unit a minimum on-time (15 minutes is a sane floor); short-cycling is how you kill one.

Path B — the existing ceiling fan. Do not put a plug in the loft and call it done. An extractor fan on fixed wiring needs a proper isolator, and a bathroom is a special location: in the UK the fixed wiring work falls under Part P, in NL and DE it is installer work. You have two sensible options: have an electrician fit a relay or a smart fan controller rated for the fan, or replace the fan with a model that has a built-in humidistat (many do) and let the hardware do the one job. Buying a €15 sensor does not make you qualified to open a ceiling rose — that is the boring sentence that keeps this article honest.

Where to put the sensor — and where not to

  • Not in the splash zone. The SNZB-02D is a battery device with a screen, not an IP44+ bathroom fitting. Zone 1 and 2 are for suitably rated hardware.
  • 1.5–2 m from the shower, on a dry wall, ideally the cold external wall — that is where condensation starts, and it is where the number is most useful.
  • Away from the door draught and above the radiator. Both distort the reading in opposite directions.
  • Reachable. A CR2450 lasts a long time but not forever, and the pairing button is on the back.
  • Pairing: hold the button about five seconds until the signal icon blinks. If it refuses to pair, take the battery out for ten seconds and try again. If it stops reporting a correct value later, the documented fix is: force-remove in Zigbee2MQTT, restart, re-pair, and update the firmware.

The honest caveats

  • A sensor is not a building fix. Mould behind a wardrobe, on a thermal bridge, or under a leaking gutter is a different problem with a different budget. Fix the water first.
  • Reporting is not instant. Report intervals are configured in Zigbee2MQTT and the device reports on change; a shower spike can arrive a minute or two late. That is fine on a ten-minute drying scale, useless for a 30-second control loop.
  • Dew point is an approximation. The Magnus formula assumes normal indoor pressure; the thresholds above are rules of thumb, not a certified moisture model.
  • Running costs are real. A 250 W dehumidifier at €0.30/kWh is roughly €0.08 per hour. On-demand beats 24/7, but “free” it is not — the plug’s energy sensor is there so you can see it instead of guessing.
  • Batteries and firmware are maintenance. Zigbee is low-maintenance, not no-maintenance. Plan for one battery swap per sensor per year or two.

Bottom line

Buy the sensor, write the template, switch the fan on humidity instead of on a timer. The SNZB-02D is the right buy here because it is cheap, accurate enough, has a display the household actually reads, and takes OTA updates through Zigbee2MQTT — and because the same listing works in the UK, Germany and the Netherlands. Add the smart plug if your drying hardware has a plug; call an electrician if it does not. That is the whole upgrade: about €40, one YAML file, and a bathroom that stops smelling of last night’s shower.