ESPHome with Sonoff Basic

I had working Sonoff Basic running Tasmota, but I decided to update it to ESPHome.

I configured it like it is recommended here: https://esphome.io/devices/sonoff_basic.html

esphome:
  name: sonoff_basic_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "my_ssid"
  password: "my_password"

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "AlarmDecoder Sonoff Button"
    on_press:
      - switch.toggle: relay

switch:
  - platform: gpio
    name: "AlarmDecoder Sonoff Relay"
    pin: GPIO12
    id: relay

status_led:
  pin:
    number: GPIO13
    inverted: yes

I configured ESPHome firmware and uploaded to the device. Upload was successful. After that, I checked and before I disconnected the Sonoff device, it connected to my WiFi network and received the IP address.
After that I disconnected device and plugged in into the wall. It is not connecting to the WiFi and it is not picking up IP address.

The Sonoff is slow flashing green light.

Any ideas?

Try adding:

hidden: true

to the wifi: part

wifi:
ssid: “my_ssid”
password: “my_password”
hidden: true

My WiFi is not hidden. Do you think I should do it anyway?

I have 4 Sonoff Basic’s running and use the following config and they work just fine

substitutions:
  devicename: lamp_1
  upper_devicename: Lamp 1

esphome:
  name: $devicename
  platform: ESP8266
  board: esp01_1m
  
wifi:
  networks:
    - ssid: "SSID"
      password: "password"
      hidden: true
  domain: ".home.lan"
  manual_ip:
    static_ip: 192.168.24.126
    gateway: 192.168.24.254
    subnet: 255.255.255.0
    dns1: 192.168.24.254
    
# Enable logging
logger:

# Enable Home Assistant API
api:

# Enable OTA support
ota:

binary_sensor:
  - platform: gpio
    name: $upper_devicename
    id: button
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    on_press:
      - switch.toggle: relay
      
switch:
  - platform: gpio
    name: $upper_devicename
    pin: GPIO12
    id: relay

status_led:
  pin:
    number: GPIO13
    inverted: yes
    
sensor:
  - platform: wifi_signal
    name: "Lamp 1 WiFi Sensor"
    update_interval: 60s

Thank you for your reply. It works now.