ESPHome Relay (ESP01) issue

When you say that compiles means that work with the latest (later) versions?
If is not asking too much and since you have the same hardware can you try this code which is very similar to mine?

That’s the same reason why I add the domain key but only for the internal domain.

BTW, i use the same board, no issues with it (just tried with latest release):

INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.103.18 using esphome API
INFO Successfully connected to doorbell @ 192.168.103.18 in 35.937s
INFO Successful handshake with doorbell @ 192.168.103.18 in 2.932s
[21:06:40][I][app:102]: ESPHome version 2024.2.2 compiled on Mar  6 2024, 21:04:13
[21:06:40][C][wifi:577]: WiFi:
[21:06:40][C][wifi:409]:   Local MAC: 98:2D:AC:F2:9C:ED
[21:06:40][C][wifi:414]:   SSID: [redacted]
[21:06:40][C][wifi:415]:   IP Address: 192.168.103.18

My base yaml:

substitutions:
  node_name: doorbell
  node_id: doorbell
  friendly_node_name: "DoorBell"

esphome:
  name: ${node_name}
  comment: ${friendly_node_name}
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_iotpw
  domain: .domain.mine
  power_save_mode: none

# Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${node_name} FB
    password: "fallback"

captive_portal:

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption

# Enable Over The Air updates
ota:

# Disable logging
logger:
  baud_rate: 0
  logs:
    sensor: ERROR
    duty_cycle: ERROR
    binary_sensor: ERROR
    light: ERROR

# Enable Web server.
web_server:
  port: 80

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: ${node_id}_homeassistant_time

plus a couple of (binary_ / text_ )sensors, switch (relay GPIO0, the normal stuff

Basically it is the same as Frenck’s doorbell with some mods