Smart bathroom ventilation system

Smart Bathroom Ventilation with Home Assistant

Bathroom ventilation is one of those small smart-home improvements that makes a noticeable difference every day. Instead of installing a of the shelve smart model, I installed a dumb fan and made it smart using a simple Sonoff THR316 switch and a Sonoff SNZB-02WD temperature and humidity sensor. The fan now turns on automatically when the humidity rises and switches off once the humidity is below a certain level again.

The hardware

The bathroom fan itself is still a simple, non-smart ventilation fan. The Sonoff THR316 controls its power supply, so Home Assistant can turn the fan on or off as needed.

To measure the humidity, I use a Sonoff SNZB-02WD sensor. It measures both temperature and humidity and sends the readings to Home Assistant. The sensor is placed in the bathroom above the shower, where it can accurately detect the increase in humidity when showering.

The automation

The automation uses two humidity thresholds. When the humidity rises above 70%, the bathroom fan switches on. Once the humidity drops below 65%, the fan switches off again. The difference between the two values prevents the fan from repeatedly switching on and off when the humidity stays around the same level.

alias: Bathroom fan humidity control 
description: Turn the bathroom fan on above 70% humidity and off below 65% 
triggers: 
    - trigger: numeric_state 
      entity_id: sensor.temp_hum_bathroom_humidity 
      above: 70 
      id: fan_on 
    - trigger: numeric_state 
      entity_id: sensor.temp_hum_bathroom_humidity 
      below: 65 
      id: fan_off 
actions: 
    - choose: 
        - conditions: 
            - condition: trigger 
              id: fan_on 
          sequence: 
            - action: switch.turn_on 
              target: 
                 entity_id: switch.bathroom_fan 
        - conditions: 
            - condition: trigger 
              id: fan_off 
          sequence: 
            - action: switch.turn_off 
              target: 
                 entity_id: switch.bathroom_fan 
mode: single

Why this works well

This setup is simple, reliable, and inexpensive. There is no need for a special smart bathroom fan or a complicated ventilation controller. The cheap and dumb fan becomes automated, while the sensor provides the information needed to decide when ventilation is required.

It also helps prevent the bathroom from staying humid for too long after a shower. That can reduce condensation and make the bathroom more comfortable. Because the fan only runs when necessary, it is also more efficient than leaving it running manually for a fixed period.

For anyone using Home Assistant, this is a great beginner-friendly automation. A basic humidity sensor and a smart switch are enough to turn an ordinary bathroom fan into a useful part of a smart home.


Find me online

neomess.nl
github.com/neomess


Special thanks

home-assistant.io
kno.wled.ge (WLED)
Pexels.com for stock photo's

Contact

Email to info@myprojects.nl or ask your question using the form below.