In This Guide
I got tired of checking weather apps that report conditions from an airport 15 miles away. I wanted hyperlocal weather data — temperature, humidity, and barometric pressure from my own backyard — feeding directly into my Home Assistant dashboard. Turns out you can build a DIY Home Assistant weather station for under $40, and it takes about an hour from unboxing to live data.
Here's exactly how I did it.
Why Build Your Own Weather Station?
Commercial weather stations from Ambient Weather or Davis Instruments run $150–$500+ and most of them lock you into a proprietary app or cloud service. If you're already running Home Assistant, you don't need any of that. An ESP32 microcontroller with a BME280 sensor gives you the same core data — temperature, humidity, and pressure — at a fraction of the cost, with zero cloud dependency.
The data stays local, updates every 60 seconds, and integrates natively with Home Assistant automations. Want your garage fan to kick on when it hits 90°F outside? Done. Want a notification when a cold front drops pressure fast? Two lines of YAML.
Parts List & Total Cost
Here's everything I used:
- ESP32 dev board (ESP-WROOM-32) — ~$8
- BME280 sensor breakout (temperature, humidity, pressure) — ~$6
- Dupont jumper wires (female-to-female, 4 pack) — ~$3
- USB-C cable + power adapter (or use any old phone charger) — ~$5
- Outdoor junction box (weatherproof enclosure) — ~$8
- Small breadboard (optional, for clean mounting) — ~$3
Total: ~$33–$40 depending on what you already have lying around. If you've got a spare USB charger and some jumper wires, you're closer to $22.
Wiring the ESP32 to the BME280
The BME280 communicates over I2C, so you only need four wires:
- VCC on BME280 → 3.3V on ESP32
- GND on BME280 → GND on ESP32
- SCL on BME280 → GPIO 22 on ESP32
- SDA on BME280 → GPIO 21 on ESP32
That's it. No soldering required if you're using a breakout board with header pins (most of them come this way). Plug in the jumper wires, double-check your pin assignments, and move on.
Common Wiring Mistakes
The two mistakes I see most often: wiring VCC to the 5V pin instead of 3.3V (the BME280 is a 3.3V device — you can fry it on 5V), and mixing up SDA/SCL. If your sensor shows up but reads all zeros, swap those two data lines.
Flashing ESPHome Firmware
If you don't already have the ESPHome add-on installed in Home Assistant, go to Settings → Add-ons → ESPHome and install it. Then create a new device and use this configuration:
esphome:
name: backyard-weather
platform: ESP32
board: esp32dev
wifi:
ssid: "YourWiFiSSID"
password: "YourWiFiPassword"
i2c:
sda: GPIO21
scl: GPIO22
sensor:
- platform: bme280_i2c
temperature:
name: "Backyard Temperature"
oversampling: 16x
pressure:
name: "Backyard Pressure"
humidity:
name: "Backyard Humidity"
address: 0x76
update_interval: 60s
Flash this to your ESP32 over USB the first time. After that, ESPHome handles over-the-air (OTA) updates, so you never need to physically plug it in again.
Within a minute of powering on, the device should appear in your Home Assistant integrations automatically. Accept it, and you'll immediately see three new sensor entities.
Setting Up the Home Assistant Dashboard
Once the entities are live, building a dashboard card is straightforward. I use a combination of the Mushroom cards and a history graph for trending.
A basic Lovelace card config:
type: entities
title: Backyard Weather
entities:
- entity: sensor.backyard_temperature
name: Temperature
- entity: sensor.backyard_humidity
name: Humidity
- entity: sensor.backyard_pressure
name: Barometric Pressure
For something more visual, the mini-graph-card (available via HACS) is excellent. It gives you a rolling 24-hour graph of each reading, which is great for spotting trends like pressure drops before storms.
Automations Worth Setting Up
With live local weather data, here are automations I actually use daily:
- Freeze warning: Sends a push notification when backyard temp drops below 33°F so I can cover plants or drip faucets.
- Humidity-triggered exhaust: If outdoor humidity drops below 40%, it triggers my whole-house fan to pull in dry air.
- Storm watch: A rapid pressure drop (>3 hPa in one hour) triggers an alert — surprisingly accurate for predicting incoming weather.
Outdoor Enclosure Tips
You need airflow over the sensor but protection from direct rain and sunlight. I used a standard PVC junction box from the hardware store and drilled ventilation holes on the bottom (so rain doesn't drip in). Key tips:
- Mount it on the north side of a structure so direct sun doesn't inflate temperature readings.
- Keep the sensor away from concrete or asphalt — radiant heat throws off readings by 5–10°F.
- Position it 4–6 feet off the ground for readings comparable to official weather station height.
- Run USB power through a weatherproof cable gland ($2 at any hardware store) to seal the enclosure entry point.
Results & What I'd Do Differently
After three months of running this station, the temperature readings consistently track within 1°F of my Ambient Weather station (which cost 5x more). Humidity is within 3%, and pressure is dead-on. For the price, the accuracy is remarkable.
If I were starting over, I'd make two changes:
- Add a rain gauge. A tipping bucket rain gauge with a reed switch can be wired into the same ESP32 for about $12 more. I'm adding this in v2.
- Use an ESP32-C3 instead. The C3 variant draws less power and still has WiFi. If you ever want to go solar-powered, the lower power draw matters.
But honestly? For a $40 DIY Home Assistant weather station that took an hour to build, I'm thrilled with it. The data is local, the updates are fast, and it ties into the rest of my smart home without any cloud accounts or subscriptions.
If you've got a Home Assistant instance running and an hour to spare, this is one of the most satisfying weekend builds you can do.
Got questions about the build? I'm always tinkering — check back for more Home Assistant projects and smart home builds.