ESPHome device not working after HA restart

Hi All,

I have 22 ESPhome devices and just one is not working when i restart HA. I need to do a hard reset on device itself.

All 21 devices have a ESP on a small board. This one is a wemos d1r1 board.

What can it be that this device is not coming up when HA is restarted?

This is the config. (Below a part of config of other boards)

#########################################################
# Below all fixed settings for bathroom PCB
#########################################################
substitutions:
  devicename: itho
  friendly: ESPHome ITHO
  ip: 192.168.100.150

#########################################################
# Everything below can be copy/paste without problem
#########################################################
esphome:
  name: ${devicename}
  platform: ESP8266
  board: nodemcuv2
  includes: 
    - lib/scriptman.h
  libraries:
    - SPI
    - Ticker
    - https://github.com/Scriptman/ESPHome_ITHO_Eco_Fan_CC1101.git
    
  on_boot:
    then:
      - lambda: |-
          Idlist[0]={"65:99:96:55:96:a9:9a:56","Kitchen"};
          Idlist[1]={"6a:59:6a:55:96:a9:9a:56","Bathroom"};
          Idlist[2]={"ID3","ID3"};
          Mydeviceid="Home Assistant";
          id(swfan_low).turn_on(); //This ensures fan is at low-speed at boot

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 0s
  fast_connect: true
  manual_ip:
    static_ip: ${ip}
    gateway: 192.168.100.1
    subnet: 255.255.255.0
    dns1: 192.168.100.1
  ap:
    ssid: ${devicename}
    password: !secret password
    channel: 4

api:
  encryption:
    key: !secret api_key
  reboot_timeout: 15min

time:
  - platform: homeassistant
    id: homeassistant_time

#preferences:
#  flash_write_interval: 1min
  
logger:
  level: info
  
ota:
  safe_mode: true
  password: !secret password

button:
  - platform: factory_reset
    name: "${friendly} - reset"

sensor:
  - platform: wifi_signal
    name: "${friendly} - wifi Signal"
    update_interval: 5min

  - platform: uptime
    name: "${friendly} - Uptime"
    update_interval: 5min

switch:
- platform: custom
  lambda: |-
    auto fansendstandby = new FanSendStandby();
    App.register_component(fansendstandby);
    return {fansendstandby};
  switches:
    name: "Standy"
    id: swfan_standby
    icon: mdi:fan
    
- platform: custom
  lambda: |-
    auto fansendlow = new FanSendLow();
    App.register_component(fansendlow);
    return {fansendlow};
  switches:
    name: "Low"
    id: swfan_low
    icon: mdi:fan

- platform: custom
  lambda: |-
    auto fansendmedium = new FanSendMedium();
    App.register_component(fansendmedium);
    return {fansendmedium};
  switches:
    name: "Medium"
    id: swfan_medium
    icon: mdi:fan

- platform: custom
  lambda: |-
    auto fansendhigh = new FanSendHigh();
    App.register_component(fansendhigh);
    return {fansendhigh};
  switches:
    name: "High"
    id: swfan_high
    icon: mdi:fan

- platform: custom
  lambda: |-
    auto fansendt1 = new FanSendIthoTimer1();
    App.register_component(fansendt1);
    return {fansendt1};
  switches:
    name: "Timer 10min"

- platform: custom
  lambda: |-
    auto fansendt2 = new FanSendIthoTimer2();
    App.register_component(fansendt2);
    return {fansendt2};
  switches:
    name: "Timer 20min"

- platform: custom
  lambda: |-
    auto fansendt3 = new FanSendIthoTimer3();
    App.register_component(fansendt3);
    return {fansendt3};
  switches:
    name: "Timer 30min"

- platform: custom
  lambda: |-
    auto fansendjoin = new FanSendIthoJoin();
    App.register_component(fansendjoin);
    return {fansendjoin};
  switches:
    name: "Pair"

text_sensor:
- platform: wifi_info
  ip_address:
    name: "${friendly} - ip"
    icon: mdi:lan
  ssid:
    name: "${friendly} - ssid"
    icon: mdi:lan
  bssid:
    name: "${friendly} - bssid"
    icon: mdi:lan
  mac_address:
    name: "${friendly} - mac"
    icon: mdi:lan
    
- platform: custom
  lambda: |-
    auto fanrecv = new FanRecv();
    App.register_component(fanrecv);
    return {fanrecv->fanspeed,fanrecv->fantimer,fanrecv->Lastid};
  text_sensors:
    - name: "Speed"
      icon: "mdi:transfer"  
    - name: "Timer"
      icon: "mdi:timer"
    - name: "Remote"
      icon: "mdi:id-card"

Config part of other boards:

#########################################################
# Below all fixed settings for bathroom PCB
#########################################################
substitutions:
  devicename: meek-bathroom
  friendly: ESPHome bathroom
  motion_sensor: binary_sensor.bathroom_detection
  ip: 192.168.100.202
  neopixel: GPIO02 # (D4)
  touch_power: GPIO16 # (D0)
  gpio_touch1: GPIO12 # (D5)
  gpio_relay1: GPIO05 # (D1)
  gpio_relay2: GPIO4 # (D2)
  gpio_relay3: GPIO15 # (D8)

#########################################################
# Everything below can be copy/paste without problem
#########################################################
esphome:
  name: ${devicename}
  on_boot:
    priority: 600
    then:
      - switch.turn_on: touch_power

esp8266:
  board: esp01_1m
  restore_from_flash: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 0s
  fast_connect: true
  manual_ip:
    static_ip: ${ip}
    gateway: 192.168.100.1
    subnet: 255.255.255.0
    dns1: 192.168.100.1
  ap:
    ssid: ${devicename}
    password: !secret password
    channel: 4