ESPHome integrations failed


I’m using Home Assistant Supervised on Rasbian. I try to install ESPHome integration to control an ESP32 device.
When I try to install ESPHome integration by enter the ip adress of my ESP32 device, i have the message :
Impossible de se connecter à ESP. Assurez-vous que votre fichier YAML contient une ligne 'api:'.

  • my ESP32 device is well connected to my network with ‘’ ip adress
  • I add ‘api:’ in my configuration.yaml file.
  • 6053 port is well redirected on my router

Thanks to your help

can you post the yaml? Are you running the the esphome addon aswell? and if so does the device show up in there?

Here is my configuration.yaml file

# Configure a default setup of Home Assistant (frontend, api, etc)
# Enable Home Assistant API

# Text to speech
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
  username: ***
  password: ***

I’m using Home Assistant Supervised so, if I understood well, I haven’t addons but just integrations


Not your configuration.yaml, the yaml file of the ESPHome device.

Developer Tools -> Info

Look for this:

installation_type Home Assistant Supervised

If your’s looks like that then you have addons (and integrations! To get the ESPHome addon, you need to add a repo. Click on the three dots at top right in Supervisor and add Now you can install the ESPHome addon.

I think maybe I have a problem with my home assistant installation : image

Is it normal ?

You must have api: in the configuration file for your ESPHome device, not in the main Home Assistant configuration.yaml. See the simple example below.

  name: esp_device
  platform: ESP8266
  board: huzzah


# Rest of the file...

Also, you shouldn’t need to do any port forwarding on your router for ESPHome discovery to work.

It says it is not docker, hassio, or venv. How did you install it? Is that a RPi 3?

thank you for you help and sorry for my questions…

I add in /home/pi/.homeassistant folder a ESP32.yaml file including :

  name: ESP32
  platform: ESP32
  board: nodemcu-32s


# Example configuration entry
  ssid: xxx
  password: xxx

  # Optional manual IP

I tried add ESPHome integration by enter host : “ESP32” or “ESP32.local”.
I have message :

I still have the same message by entre host : "


  password: 'esp32'

to the .yaml and install that. It does not matter what password you use but I think you need to enable ota: Copy that .yaml configuration into ESPHome and it may work!

Double check the IP address for the ESP32. You should be able to ping the address. You can install “zenmap” or use nmap from the command line. This will do a ping sweep of your network:

# nmap -sn

I’m not sure what the MAC addresses look like for ESP32 but Google all the ones you do not recognise.

I added :

  password: 'esp32'

in my ESP32.yaml file but same issue.

Ping seems OK :

[email protected]:~ $ nmap -sn
Starting Nmap 7.70 ( ) at 2020-06-09 18:15 CEST
Nmap scan report for
Host is up (0.15s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds

I’ll try tomorrow to install on another SD card to see if ESPHome installation by add on interface solves the problem…
But I’d like
to keep Rasbian installed and I wish to not have all my zwave devices to remove et include again…

Remove the static ip (the whole manual ip section) and let your DHCP assing the ip address. Check from the router what ip the esp has and try that.

Does the device show as online in the ESPHome Configuration page? There should be a green dot and word online next to it like this one:


This is separate from the Home Assistant integration, so it should show online even if you haven’t completed adding the integration. If it does show online, add

  level: DEBUG

to your configuration. When the device reappears as online, start by clicking Show Logs. You should be able to see if it has connected to the API. It can sometime take awhile for the device to appear or to connect.

When you change from a static IP as mentioned above, you can also view the IP address in the log.

I solve my problem.
I just forgot to install ESPHome on my rasbian by

pip install esphome

before add the integration in home assistant

I thought i should control my ESP32 device either by Rasbian either by Home Assistant…

Thank you for your help

1 Like

Anhone get this working with the epshome docker container (not hassio)? I’m trying to get it all setup without having a device yet, but it gives me this api error and there is no esphome root config file created. (it does create .esphome/platformio though…)