ESP32 and BME280: a budget weather station to power Home Assistant automations

A DIY weather station built around an ESP32 microcontroller and a BME280 sensor can serve as a low-cost way to expand Home Assistant automation scenarios. The author of one such project explained how he assembled the device and why he picked this particular combination of components.
The ESP32 offers plenty of possibilities: it can be turned into a Bluetooth proxy, a Wi-Fi strength analyzer, or a Thread border router, though the last one requires a compatible board. Still, the weather station remains one of the most popular starting projects. As the enthusiast notes, he had already converted an ESP32-WROOM board into a similar device before, and the project proved useful for automations.
The BME280 module was chosen as the measuring unit, even though the build could technically run on the cheaper DHT11. The author would not recommend the latter: its temperature range is limited to 0–50°C and accuracy is ±2°C, which is not precise enough for recording temperature variations in Home Assistant trigger-action rules. The DHT22 alternative works from -40°C to +80°C and is more accurate at ±0.5°C, but the author went with the slightly pricier BME280. Despite its rated accuracy of ±1°C (±0.5°C at 25°C), which is formally worse than the DHT22, the BME280 also measures barometric pressure and delivers nearly instant readings, making it better suited for complex scenarios.
Connecting the BME280 to the ESP32-WROOM was straightforward: the CS and ADDR/MISO pins were left unplugged, and the wiring was checked against a pinout table. The microcontroller was prepared using ESPHome Device Builder, with the configuration written in YAML. Flashing and setup took little time, after which the weather station was ready for integration with Home Assistant.
This approach yields a functional device at a small cost, and the sensor choice directly affects the accuracy and the range of data available for automations.


