Breathe Easy: How to Monitor Air Quality and Automate Your Home with

Chris Snyder • April 14, 2025

Improve your home’s health and intelligence by monitoring humidity, temperature, and air quality—then automate your bathroom fan and more with HomeKit and Home Assistant.

Introduction

Indoor air quality isn’t just a concern for allergy sufferers—it's essential for everyone. From lingering shower humidity to VOCs from cleaning products, monitoring air quality can help you stay healthier, avoid mold, and make your smart home... well, smarter. Let’s explore how you can track your home’s air quality and trigger automations with platforms like Apple HomeKit and Home Assistant.



Why Air Quality Monitoring Matters

  • Health & Comfort: High humidity can lead to mold growth. Poor air quality contributes to allergies, headaches, fatigue, and respiratory issues.
  • Smart Energy Use: Avoid running air purifiers and fans unnecessarily by automating them based on real-time data.
  • Peace of Mind: Whether it’s for your family, elderly loved ones, or guests with sensitivities, knowing the air is clean and safe adds a layer of comfort.



Smart Air Quality Sensors That Work with HomeKit and Home Assistant

🔹 Aqara Temperature and Humidity Sensor
  • Works natively with Home Assistant over Zigbee.
  • Works with HomeKit using the Aqara M3 hub over Matter.
  • Tracks temperature and humidity.
  • Affordable and reliable.
🔹 Eve Room (HomeKit)
  • Works natively with HomeKit (no hub required).
  • Measures VOCs, temperature, and humidity.
  • Bluetooth and Thread compatible.
🔹 Airthings View Plus
  • Supports Home Assistant via integrations.
  • Monitors radon, PM2.5, CO2, VOCs, humidity, and temperature.
  • Great for detailed insights.
🔹 Awair Element
  • Works with Home Assistant via community integrations.
  • Measures temperature, humidity, CO2, VOCs, and PM2.5.



Real-World Use Case: Automating a Bathroom Fan When You Shower

A common pain point: bathrooms fog up after a hot shower and can lead to mold or peeling paint if not properly ventilated. Let’s fix that with smart tech.

🛠️ Setup for HomeKit

What you need:

  • Aqara Temperature and Humidity Sensor
  • Aqara M3 hub (Matter-enabled)
  • A smart switch or plug for the fan (e.g., Lutron Caséta, Eve Energy)

How to:

  1. Add your Aqara sensor and hub to the Apple Home app.
  2. Add your smart plug or switch that controls the fan.
  3. Create an automation:
  • When: Humidity rises above 70%
  • Then: Turn on the bathroom fan
  • Optionally: Turn off the fan when humidity drops below 60%

Note: These trigger points might need to be adjusted depending on your local weather and how hot you like your showers. In a humid climate or for cooler showers, the spike in humidity might be smaller, so you may need to use lower thresholds.

🛠️ Setup for Home Assistant

What you need:

  • Aqara Temperature and Humidity Sensor (Zigbee)
  • Zigbee hub (ZHA or Zigbee2MQTT)
  • Smart switch or relay for the fan

How to:

  1. Pair the Aqara sensor in Home Assistant via Zigbee.
  2. Go to Automations and create a new one:
  • Trigger: Humidity goes above 70%
  • Condition: (optional) Only between certain hours or when room is occupied
  • Action: Turn on the fan entity
  • Add a second automation to turn the fan off when humidity drops below a set level (e.g., 60%).

Example YAML for Home Assistant:


alias: Turn On Bathroom Fan When Showering

trigger:

  - platform: numeric_state

  entity_id: sensor.bathroom_humidity

  above: 70

condition: []

action:

  - service: switch.turn_on

  target:

  entity_id: switch.bathroom_fan

mode: single


alias: Turn Off Bathroom Fan After Shower

trigger:

  - platform: numeric_state

  entity_id: sensor.bathroom_humidity

  below: 60

condition: []

action:

  - service: switch.turn_off

  target:

  entity_id: switch.bathroom_fan

mode: single

Bonus Tip: Home Assistant also has a community-contributed Blueprint called Bathroom Humidity Exhaust Fan that adds more configuration, options, and optimizations. This is highly recommended if you want a more advanced and reliable setup without writing YAML from scratch. You can find it here: Bathroom Humidity Exhaust Fan Blueprint



Bonus Ideas for Air Quality Automations

  • Run an air purifier when PM2.5 is high
  • Send a notification if CO2 or VOCs spike
  • Lower your shades if temperature and sun are too high
  • Turn on a humidifier when air is too dry in winter



How Heritage Home Technologies Can Help

Whether you're just getting started or want to integrate whole-home air quality monitoring, Heritage Home Technologies can guide you every step of the way. We’ll help you choose the right sensors, get them connected to Home Assistant or HomeKit, and build powerful automations tailored to your needs—especially if you’re caring for aging family members or those with special sensitivities.

By Chris Snyder April 16, 2025
Improve indoor air quality, enhance your family's health, and save money by automating your windows and HVAC system based on air quality.
By Chris Snyder April 8, 2025
How to Build a Reliable, Private, and Hassle-Free Smart Home from the Start
By Chris Snyder March 24, 2025
Your Comprehensive Guide to Budget-Friendly Smart Home Technologies That Slash Utility Costs and Simplify Everyday Living
By Chris Snyder March 17, 2025
Empowering Independence: How Smart Home Technology Enhances Safety and Well-Being for Seniors
By Chris Snyder March 11, 2025
What You Need to Know
Show More