← Back

Weather station

Built on XDAI built a cheap ESP32 weather station to automate my Home Assistant serverBy Ayush Pande
ESP32 DevKit V1

BME280 breakout, 3.3V (GY-BME280-3.3)

SCLD22SDAD21GNDGNDVCC3V3

Compatibility checks

No issues found

Wiring steps

  1. 1

    BME280 breakout, 3.3V

    • GNDtoGND
    • VCCto3V3
    • SDAtoD21
    • SCLtoD22
  2. 2

    Plug in the USB cable last.

ESPHome config

Paste into ESPHome Device Builder.

esphome:
  name: weather-station

esp32:
  board: esp32dev

logger:
api:
  encryption:
    key: !secret api_encryption_key  # make one at esphome.io/components/api
ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

i2c:
  - sda: GPIO21
    scl: GPIO22

sensor:
  - platform: bme280_i2c
    address: 0x76  # or 0x77
    temperature:
      name: "BME280 Temperature"
      id: reading_1
    pressure:
      name: "BME280 Pressure"
      id: reading_2
    humidity:
      name: "BME280 Humidity"
      id: reading_3

Some board drawings are from Wokwi and Seeed Studio.