Home Assistant ESPHome: Build Custom Smart Devices for Pennies

Why pay $30 for a temperature sensor when you can build one for $8? ESPHome turns cheap ESP32 boards into custom smart home devices that integrate perfectly with Home Assistant. No coding required, just simple YAML files.

Check Your Devices Starter Kit Guide

What Is ESPHome?

Think of ESPHome as a translator between you and cheap microcontroller boards. You describe what you want in a simple YAML file, and ESPHome turns that into firmware your ESP32 can run. The result? Custom smart home devices that talk directly to Home Assistant, completely local, no cloud involved.

How it works in 4 steps

1

Write a YAML config

Describe your board, sensors, switches, and automations in plain text. No programming languages, no compilers to install.

2

ESPHome compiles firmware

The ESPHome add-on in Home Assistant turns your YAML into proper firmware automatically. One click, done.

3

Flash it to your board

Plug in your ESP32 via USB, flash the firmware, and it connects to your Wi-Fi. After the first flash, future updates happen wirelessly (OTA).

4

It appears in Home Assistant

Home Assistant auto-discovers your new device. All sensors, switches, and controls show up ready to use in dashboards and automations.

Why Use ESPHome with Home Assistant?

Commercial smart home devices are great, but they come with compromises: cloud dependencies, limited features, and prices that add up fast. ESPHome removes all three problems.

Insanely cheap

An ESP32 board costs $3 to $8. A temperature and humidity sensor costs $2 to $5. Build a complete environmental monitor for less than the price of a coffee. Commercial equivalents cost $20 to $50 each.

100% local

No cloud accounts, no subscriptions, no data leaving your home. ESPHome devices talk directly to Home Assistant on your local network. They keep working even if your internet goes down.

No coding needed

If you can edit a text file, you can use ESPHome. Everything is configured in YAML, the same format Home Assistant uses. No C++, no Arduino IDE, no compiling headaches.

Infinitely customizable

Want a sensor that measures temperature, humidity, air pressure, and light level all in one box? Build it. Need a presence sensor that works exactly how you want? Make it. ESPHome supports hundreds of components.

Wireless updates (OTA)

After the first USB flash, all future updates happen over Wi-Fi. Change a config, hit update, and the new firmware pushes wirelessly. No crawling behind furniture to unplug devices.

Bluetooth proxy

ESP32 boards can act as Bluetooth proxies for Home Assistant. Place one in each room and suddenly your Bluetooth range covers your whole house. Great for Switchbot, plant sensors, and other BLE devices.

Best ESP32 Boards for Home Assistant

Not all boards are equal. Here's what to buy depending on your project.

๐Ÿ†

BEST VALUE

ESP32-WROOM-32 DevKit

$3 to $8 | Wi-Fi + Bluetooth

The workhorse. Tons of GPIO pins, dual-core processor, and massive community support. Perfect for sensors, relays, LED strips, and basically everything else. Buy a 5-pack for under $20.

๐Ÿ“ก

BLE PROXY

ESP32-C3 / ESP32-S3

$4 to $10 | Wi-Fi + BLE 5.0

Newer chips with better Bluetooth Low Energy support. Ideal for Bluetooth proxy setups where you want to extend BLE range throughout your home. The S3 also has USB native support for easier initial flashing.

๐ŸŽ™๏ธ

VOICE

M5Stack ATOM Echo

$10 to $13 | Built-in mic + speaker

A tiny cube with a built-in microphone and speaker. Flash it with ESPHome and you have a local voice assistant for Home Assistant. Think of it as a $13 Alexa replacement that respects your privacy.

๐Ÿ“บ

DISPLAY

LilyGO T-Display S3

$12 to $18 | Built-in LCD screen

ESP32-S3 board with a small color display built in. Great for bedside clocks, thermostats, or mini dashboards. ESPHome has full display support, so you can show any data from Home Assistant.

๐Ÿ’ฐ

BUDGET

ESP8266 (D1 Mini / NodeMCU)

$2 to $4 | Wi-Fi only

The older, cheaper option. Less memory and no Bluetooth, but perfectly fine for simple sensors and switches. If all you need is a temperature sensor or a relay, this gets the job done for under $3.

10 ESPHome Starter Projects

Start with one of these and you will be hooked. Each project includes what you need, approximate cost, and difficulty level.

BEGINNER ~$8

Temperature and Humidity Sensor

ESP32 + DHT22 sensor. Reports temperature and humidity to Home Assistant every 30 seconds. Perfect first project because it is simple, useful, and teaches you the basics.

Parts: ESP32 dev board, DHT22 sensor, USB cable, 3D printed case (optional)

BEGINNER ~$6

Bluetooth Proxy

Flash an ESP32 as a Bluetooth proxy and extend BLE range throughout your house. Picks up Switchbot, Xiaomi plant sensors, and other Bluetooth devices that are too far from your server.

Parts: ESP32 board (C3 or S3 preferred), USB power adapter

BEGINNER ~$5

Door and Window Sensor

ESP32 + magnetic reed switch. Know when any door or window opens. Feed this into your security automations for instant alerts.

Parts: ESP8266/ESP32, reed switch, magnet, wire

INTERMEDIATE ~$12

Air Quality Monitor

ESP32 + BME280 (temp/humidity/pressure) + optional SGP30 (VOC/CO2). Track indoor air quality and trigger automations to open windows or turn on ventilation.

Parts: ESP32, BME280 sensor, SGP30 sensor (optional), connecting wires

INTERMEDIATE ~$15

WLED Addressable LED Strip

ESP32 + WS2812B LED strip. Create stunning ambient lighting with hundreds of effects. Control colors and brightness from Home Assistant or the WLED app. Works great with your lighting automations.

Parts: ESP32, WS2812B strip (1-5m), 5V power supply, level shifter (optional)

INTERMEDIATE ~$10

Smart Power Plug (Reflash)

Many cheap Tuya/Smart Life plugs have ESP chips inside. Flash them with ESPHome and they become local, cloud-free smart plugs with energy monitoring. Check devices on devices.esphome.io first.

Parts: Compatible smart plug (check Athom or CloudFree pre-flashed options)

INTERMEDIATE ~$8

mmWave Presence Sensor

ESP32 + LD2410 radar sensor. Detects presence even when you are sitting still, unlike PIR motion sensors. Use it for automations like keeping lights on while you are reading.

Parts: ESP32, HLK-LD2410 or LD2450 module, USB power

INTERMEDIATE ~$13

Local Voice Assistant

M5Stack ATOM Echo + ESPHome voice assistant firmware. A privacy-first voice assistant for $13 that works with Home Assistant's Assist pipeline. No Amazon or Google listening in.

Parts: M5Stack ATOM Echo, USB-C cable

ADVANCED ~$20

Energy Monitor (CT Clamp)

ESP32 + SCT-013 current transformer. Monitor your whole home's electricity usage in real time. Feed data into Home Assistant's energy dashboard for detailed tracking.

Parts: ESP32, SCT-013 CT clamp, burden resistor, 3.5mm jack

ADVANCED ~$25

E-Ink Dashboard Display

ESP32 + Waveshare e-ink display. Build a low-power display that shows weather, calendar events, or sensor readings. E-ink screens use almost no power and look great in any room.

Parts: ESP32, Waveshare e-paper display (2.9" or 4.2"), connecting wires

Getting Started with ESPHome in Home Assistant

From zero to your first working device in about 30 minutes. Here is the quickest path.

1. Install the ESPHome Add-on

In Home Assistant, go to Settings โ†’ Add-ons โ†’ Add-on Store and search for ESPHome. Install it and start it. This gives you a web dashboard where you manage all your ESPHome devices.

If you are running Home Assistant in Docker (not HAOS), you can run ESPHome as a standalone Docker container instead.

2. Create a New Device

Click "New Device" in the ESPHome dashboard. Give it a name (like "living-room-sensor"), pick your board type (ESP32 or ESP8266), and enter your Wi-Fi credentials. ESPHome generates the base config for you.

3. Add Your Components

Edit the YAML config and add whatever sensors or outputs you have wired up. Here is a temperature sensor example:

sensor:
  - platform: dht
    pin: GPIO4
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 30s

4. Flash Your Board

For the first flash, connect your ESP32 via USB and click "Install" in the ESPHome dashboard. Choose "Plug into this computer" and select the USB port. The firmware compiles and flashes automatically. Takes about 2 minutes.

Alternative: use web.esphome.io to flash directly from your browser using Web Serial. No add-on needed.

5. Add to Home Assistant

Home Assistant should auto-discover your new device within seconds. Go to Settings โ†’ Devices & Services and look for the ESPHome integration. Click configure, and all your sensors and entities appear. Done. Use them in dashboards and automations just like any other device.

ESPHome vs. Buying Commercial Devices

ESPHome is not always the answer. Here is when to build and when to buy.

Build with ESPHome when:

  • โ†’ You need lots of the same sensor (cost adds up fast)
  • โ†’ You want something custom that doesn't exist commercially
  • โ†’ Privacy is critical and you want zero cloud contact
  • โ†’ You enjoy tinkering and learning
  • โ†’ You have power outlets nearby (ESP devices need constant power)

Buy commercial when:

  • โ†’ You need battery power (Zigbee sensors last years on a coin cell)
  • โ†’ You want a polished look with a proper enclosure
  • โ†’ Time matters more than money
  • โ†’ You just need one or two devices
  • โ†’ Safety is involved (don't DIY mains electricity)

ESPHome Pro Tips

Lessons from the community that will save you hours of troubleshooting.

Set a static IP address

DHCP can change your device's IP and cause connection drops. Set a static IP in the YAML config or reserve it in your router. This is the number one fix for "device keeps going offline" issues.

Use 2.4GHz Wi-Fi only

ESP boards only support 2.4GHz Wi-Fi. If your router merges 2.4 and 5GHz into one SSID, create a separate 2.4GHz network for your IoT devices. Better range, fewer connection issues.

Use good USB cables

Cheap USB cables are the cause of 90% of "I can't flash my board" problems. If your board isn't detected, try a different cable. Make sure it is a data cable, not just a charging cable.

Back up your YAML configs

Your ESPHome YAML files are stored in the config directory. Back them up regularly. If you reinstall Home Assistant, your devices keep running but you will need the configs to make changes.

Use the fallback hotspot

ESPHome creates a fallback Wi-Fi hotspot if it cannot connect to your network. This saves you from having to reflash via USB if you change your Wi-Fi password or move to a new house.

Buy pre-flashed if lazy

Companies like Athom and CloudFree sell devices pre-flashed with ESPHome. Smart plugs, light bulbs, relay boards, all ready to configure. Skip the hardware tinkering and go straight to YAML.

Ready to Start Building?

ESPHome opens up a whole new level of smart home possibilities, from flashing your first ESP32 to converting Tuya plugs. Start with a starter kit, run a free device compatibility scan, and see what your smart home could become.

Free Device Scan Zigbee Guide

Frequently Asked Questions

What is ESPHome and how does it work with Home Assistant?

ESPHome is a tool that turns cheap ESP32 and ESP8266 microcontroller boards into smart home devices. You write a simple YAML configuration file describing what sensors, switches, or displays you want, and ESPHome compiles it into firmware that flashes directly onto the board. Once running, the device automatically connects to Home Assistant over your local network. No cloud, no coding, no subscription fees.

Do I need to know how to code to use ESPHome?

No. ESPHome uses YAML configuration files, not programming code. You describe what hardware you have connected and what you want it to do, and ESPHome handles the rest. If you can edit a text file, you can use ESPHome. The Home Assistant add-on even has a visual editor for common configurations.

What ESP32 board should I buy for ESPHome?

The ESP32-WROOM-32 development board is the most popular choice, typically costing between $3 and $8. For projects needing Bluetooth proxy support, grab an ESP32-C3 or ESP32-S3 board. If you want the easiest possible start, the M5Stack ATOM Lite or ATOM Echo are pre-built ESP32 devices with cases that work great with ESPHome right out of the box.

How much does an ESPHome project cost?

An ESP32 board costs about $3 to $8. Common sensors like DHT22 (temperature and humidity) cost around $2 to $5. A complete temperature sensor project can cost under $10 total. Compare that to commercial Zigbee sensors at $15 to $30 each. The tradeoff is that ESPHome devices need Wi-Fi and a power source, and you spend time on setup instead of money on products.

Is ESPHome local only or does it need the cloud?

ESPHome is 100% local. Your devices communicate directly with Home Assistant over your Wi-Fi network. No data ever leaves your home, no cloud accounts needed, no subscriptions, and everything keeps working if your internet goes down. The only time you need internet is during the initial firmware compilation if you use the Home Assistant add-on.