Practical guide · 6 min read
BME280, BME680 or SGP40: choosing a DIY sensor for Home Assistant
Compare temperature, humidity, pressure, VOC and CO2 measurements before building an ESPHome environmental sensor.

Start with the measurement you need
Indoor comfort, ventilation and weather monitoring need different measurements. Temperature and humidity may be sufficient for a bedroom, while a ventilation decision based on occupancy can require a dedicated CO2 sensor. Do not choose a board solely because it advertises several measurements.
A bare sensor board also needs a controller, a stable power supply and an enclosure that allows air to circulate. It does not pair directly with ZHA or Zigbee2MQTT.
Understand the differences between the chips
The BME280 measures temperature, humidity and pressure. The BME680 adds a gas-sensitive response, often reported as resistance. The SGP40 supports VOC monitoring with the appropriate software processing. Neither gas resistance nor a VOC index is a direct CO2 concentration in ppm.
For CO2, consider a dedicated sensor such as the SCD41 and check its installation requirements.
Prepare the ESPHome build
Check the ESPHome component for the exact chip and verify its interface, voltage and wiring. Grove, Qwiic and Stemma QT connectors simplify assembly but do not guarantee matching electrical requirements.
Start with one sensor, check its bus address and give entities clear names and units. Keep credentials separate from the configuration and test reconnection after a restart.
Validate readings before automating
Keep the sensor away from a hot regulator, direct sunlight and airflow from a vent. Compare trends over several days before applying an offset.
Ventilation rules need a minimum operating time, a separate return threshold and safe behaviour when readings become unavailable. DIY environmental modules do not replace certified smoke or gas safety detectors.
Common questions
Does the BME680 measure CO2?
No. Its gas-sensitive output must not be presented as a direct CO2 measurement. Use a dedicated CO2 sensor when that measurement is required.





