← All notes
ElectronicsESP32ESPHomeHome Assistant

Getting Started with ESPHome — From Zero to Home Assistant in 30 Minutes

A practical walkthrough of setting up ESPHome on an ESP32 dev board, creating a simple temperature sensor, and integrating it with Home Assistant — no Arduino IDE required.

·3 min read

If you've been putting off building your own ESP32 sensors because setting up the Arduino IDE sounds painful — good news. ESPHome lets you write YAML, click flash, and have a working device in minutes.

Here's how to go from a bare ESP32 to a live temperature sensor in Home Assistant.

What you need

  • An ESP32 or ESP8266 dev board (I'm using a Wemos D1 Mini32 for this)
  • A BME280 sensor breakout ($3–6 on AliExpress)
  • USB cable
  • A machine running Home Assistant (the ESPHome add-on runs inside HA)

Step 1: Install the ESPHome Add-on

In Home Assistant:

  1. Go to Settings → Add-ons → Add-on Store
  2. Search for "ESPHome"
  3. Install and start it
  4. Click "Open Web UI"

Step 2: Create a new device

In the ESPHome UI, click New Device, give it a name (e.g., office-sensor), and select your board. This generates a base config:

esphome:
  name: office-sensor
 
esp32:
  board: wemos_d1_mini32
  framework:
    type: arduino
 
logger:
api:
ota:
  password: "generatedpassword"
 
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Office-Sensor Fallback"
    password: "fallbackpassword"

Step 3: Wire the BME280

The BME280 communicates over I²C. Connect:

BME280 PinESP32 Pin
VCC3.3V
GNDGND
SDAGPIO21
SCLGPIO22

Step 4: Add sensor config

Append this to your YAML:

i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true
 
sensor:
  - platform: bme280_i2c
    temperature:
      name: "Office Temperature"
      oversampling: 16x
    pressure:
      name: "Office Pressure"
    humidity:
      name: "Office Humidity"
    address: 0x76
    update_interval: 60s

Step 5: Flash

First flash must be over USB (plug the board in to your HA machine or use the ESPHome flasher from another computer). After that, all updates are OTA — wireless, no cables.

Click Install → Plug into this computer and follow the prompts. The web-based flasher handles everything.

Step 6: Add to Home Assistant

Once the device boots and connects to WiFi, HA will show a notification: New device discovered. Click Configure and the entities appear immediately.

Bonus: Display Friendly Names

Add this to your YAML to give your device a clean HA device name and area:

esphome:
  name: office-sensor
  friendly_name: Office Sensor
  area: Office

That's it

You now have live temperature, humidity, and pressure readings in Home Assistant, updating every 60 seconds, with no cloud dependency, no subscription, and total control over the firmware.

The next step is building automations on top of it — like turning on a fan when the office gets above 26°C — but that's a post for another day.