No notification after adding new device

Hi,
I am almost HA beginer since 10 days.

  1. I click on new device and flash my ESP01S 1M wired
  2. I flash it wireless
  3. it looks good: I can see ONLINE

But I never see Notification so I cannot input my API key and add the device to dashboard

I tried to restart AH, restart ESPHome.
Any idea?

Many thx!

Device looks working well

You don’t appear to have any sensors or switches defined - so not surprising there is nothing to add. Post your YAML. Do not post screenshots, copy and paste the text using the Preformatted Text tags in the posting toolbar. They look like </>.

Hi,
Thank you for your support.

Installed version of ESPHome is 2022.12.0
One DS18B20 sensor:

esphome:
  name: temp

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "o6TjQQSYWvBg="

ota:
  password: "25c4a3f59b0f7"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Temp Fallback Hotspot"
    password: "MfA6Bq"

captive_portal:
# Example configuration entry
dallas:
  - pin: GPIO2

# Individual sensors
sensor:
  - platform: dallas
    address: 0xcc3c01d075978128
    name: "Living Room Temperature"

Log:

INFO Reading configuration /config/esphome/temp.yaml...
INFO Starting log output from temp.local using esphome API
INFO Successfully connected to temp.local
[08:57:43][I][app:102]: ESPHome version 2022.12.0 compiled on Dec 15 2022, 18:21:11
[08:57:43][C][wifi:504]: WiFi:
[08:57:43][C][wifi:362]:   Local MAC: XX:5B:XX:XX:XX:95
[08:57:43][C][wifi:363]:   SSID: 'xxx'[redacted]
[08:57:43][C][wifi:364]:   IP Address: 192.168.0.10
[08:57:43][C][wifi:365]:   BSSID: XX:65:A3:XX:XX:XX[redacted]
[08:57:43][C][wifi:367]:   Hostname: 'temp'
[08:57:43][C][wifi:369]:   Signal strength: -27 dB ▂▄▆█
[08:57:43][C][wifi:373]:   Channel: 6
[08:57:43][C][wifi:374]:   Subnet: 255.255.255.0
[08:57:43][C][wifi:375]:   Gateway: 192.168.0.1
[08:57:43][C][wifi:376]:   DNS1: 1.1.1.1
[08:57:43][C][wifi:377]:   DNS2: 1.0.0.1
[08:57:43][C][logger:293]: Logger:
[08:57:43][C][logger:294]:   Level: DEBUG
[08:57:43][C][logger:295]:   Log Baud Rate: 115200
[08:57:43][C][logger:296]:   Hardware UART: UART0
[08:57:43][C][dallas.sensor:075]: DallasComponent:
[08:57:43][C][dallas.sensor:076]:   Pin: GPIO2
[08:57:43][C][dallas.sensor:077]:   Update Interval: 60.0s
[08:57:43][D][dallas.sensor:082]:   Found sensors:
[08:57:43][D][dallas.sensor:084]:     0xcc3c01d075978128
[08:57:43][C][dallas.sensor:089]:   Device 'Living Room Temperature'
[08:57:43][C][dallas.sensor:089]:     Device Class: 'temperature'
[08:57:43][C][dallas.sensor:089]:     State Class: 'measurement'
[08:57:43][C][dallas.sensor:089]:     Unit of Measurement: '°C'
[08:57:43][C][dallas.sensor:089]:     Accuracy Decimals: 1
[08:57:43][C][dallas.sensor:097]:     Address: 0xcc3c01d075978128
[08:57:43][C][dallas.sensor:098]:     Resolution: 12
[08:57:43][C][captive_portal:088]: Captive Portal:
[08:57:43][C][mdns:103]: mDNS:
[08:57:43][C][mdns:104]:   Hostname: temp
[08:57:43][C][ota:093]: Over-The-Air Updates:
[08:57:43][C][ota:094]:   Address: temp.local:8266
[08:57:43][C][ota:097]:   Using Password.
[08:57:43][C][api:138]: API Server:
[08:57:43][C][api:139]:   Address: temp.local:6053
[08:57:43][C][api:141]:   Using noise encryption: YES
[08:57:52][D][dallas.sensor:143]: 'Living Room Temperature': Got Temperature=18.1°C
[08:57:52][D][sensor:126]: 'Living Room Temperature': Sending state 18.06250 °C with 1 decimals of accuracy
[08:58:01][D][api:102]: Accepted 192.168.0.46
[08:58:02][W][api.connection:071]: 192.168.0.46: Socket operation failed: CONNECTION_CLOSED errno=11
[08:58:52][D][dallas.sensor:143]: 'Living Room Temperature': Got Temperature=18.1°C
[08:58:52][D][sensor:126]: 'Living Room Temperature': Sending state 18.12500 °C with 1 decimals of accuracy
[08:59:02][D][api:102]: Accepted 192.168.0.46
[08:59:02][W][api.connection:071]: 192.168.0.46: Socket operation failed: CONNECTION_CLOSED errno=11

Ok I don’t use encryption for any of my nodes, but there is an option under the ellipsis menu - the three dots under the “ONLINE” text you circled in red above.

One of the menu options is for the API key - what does that do?

Otherwise someone who does use encryption could chime in…

Nothing special in this menu:
3
I uninstall/install ESPHome to check if it can solve my issue

ESPHome reinstall did not solve my issue.
Still not possible to add devices to dashboard

Settings, devices and services, click the big +, choose esphome, add device.

thx for the tip but something is not working well:

I add device Hostname and port is 6053 by default.
But: “Unable to connect to ESP. Make sure your YAML file contains an ‘api:’ line.”
My device yaml:

api:
  encryption:
    key: "CfagG7R+N3Nxxxxxxxxxx5xxxxx9t+xxxxxx="

I am trying to understand what means
[W][api.connection:071]: 192.168.0.46: Socket operation failed: CONNECTION_CLOSED errno=11
HA is running on a virtualbox machine
192.168.0.46 is the IP of the VM

I add device IP adress and port 6053
Then API key and it WORKS !!!

For completeness I add Error adding ESP8266 in Home Assistant: Socket Operation Failed: Connection_Closed errno=11