Professional Documents
Culture Documents
Getting Started With ESPHome and Home Assistant - ESPHome
Getting Started With ESPHome and Home Assistant - ESPHome
Guides ➔
Getting Started with ESPHome and Home Assistant
If you do not have the official ESPHome add-on repository added you can add with this button:
ADD-ON
After that, wait a bit until it is installed (this can take a while). Click “Start” and then click “Open Web UI”.
If you see “502: Bad Gateway” it is currently starting, and you can refresh the page after a couple of
seconds.
You should now be greeted by a nice introduction wizard which will step you through
creating your first
configuration.
A new version has been release since you last visited this page: 2022.10.0 🎉 Dismiss
View Changelog
https://esphome.io/guides/getting_started_hassio.html 1/5
2022. 10. 19. 9:36 Getting Started with ESPHome and Home Assistant — ESPHome
The wizard will guide you through creating your first configuration and, depending on your browser, in-
stall it on your ESP device. You will need to name your configuration and enter your wireless network set-
tings so that the ESP device can come online and can communicate with Home Assistant.
Note:
The most difficult part of setting up a new ESPHome device is the initial installation. Installation
requires that your ESP device is connected with a cable to a computer. Later updates can be in-
stalled wirelessly.
For guidance on making this first connection, see Physically Connecting to your Device
Dashboard Interface
Assuming you created your first configuration file with the wizard, let’s take a quick
tour of the ESPHome
Dashboard interface.
A new version has been release since you last visited this page: 2022.10.0 🎉 Dismiss
View Changelog
https://esphome.io/guides/getting_started_hassio.html 2/5
2022. 10. 19. 9:36 Getting Started with ESPHome and Home Assistant — ESPHome
On the front page you will see all configurations for nodes you created. For each file,
there are a few basic
actions you can perform:
UPDATE: This button will show up if the device has not been installed with the same ESPHome ver-
sion currently running.
EDIT: This will open the configuration editor.
LOGS: With this command you can view all the logs the node is outputting. If a USB device is
con-
nected, you can choose to use the serial connection. Otherwise it will use the built-in OTA logs.
Overflow menu: This is a dropdown menu which allows you to perform more actions.
Validate: This will validate the configuration file.
Install: Opens the Install dialog.
Clean Build Files: This will delete all of the generated build files and is a safe operation to per-
form. Sometimes old files are not removed and can cause compile issues later on.
Delete: This will delete the configuration file.
The configuration files for ESPHome can be found and edited under <HOME_ASSISTANT_CONFIG>/esphome/.
For example the configuration for the garage-door node in the picture above can be found
in
/config/esphome/garage-door.yaml.
Now go ahead and use one of the devices guides to extend your configuration.
switch:
- platform: gpio
pin: 5
In above example, we’re simply adding a switch that’s called “Living Room Dehumidifier” (could control
anything really, for example lights) and is connected to the pin GPIO5.
A new version has been release since you last visited this page: 2022.10.0 🎉 Dismiss
View Changelog
https://esphome.io/guides/getting_started_hassio.html 3/5
2022. 10. 19. 9:36 Getting Started with ESPHome and Home Assistant — ESPHome
ADD INTEGRATION
Alternatively, you can manually add the device on the Home Assistant Integrations page. Click on the “Add
Integration” button (bottom right), search for esphome, and enter the host name, eg:
“<NODE_NAME>.local” as the host. Use the same process to add multiple esphome devices.
After the first installation, you will probably never need to use the USB
cable again, as all features of
ESPHome are enabled remotely as well.
binary_sensor:
- platform: gpio
pin:
number: 16
inverted: true
mode:
input: true
pullup: true
This time when installing, you don’t need to have the device plugged in
through USB again. The upload
will happen wirelessly (“over the air”).
Where To Go Next
Great 🎉! You’ve now successfully setup your first ESPHome project
and installed your first ESPHome
custom firmware to your node. You’ve
also learned how to enable some basic components via the configu-
ration
file.
See Also
ESPHome index
Getting Started with the ESPHome Command Line
A new version
Edit thishas been
page onrelease
GitHubsince you last visited this page: 2022.10.0 🎉 Dismiss
View Changelog
https://esphome.io/guides/getting_started_hassio.html 4/5
2022. 10. 19. 9:36 Getting Started with ESPHome and Home Assistant — ESPHome
https://esphome.io/guides/getting_started_hassio.html 5/5