ESPHome limited IO pins?

A month or so ago I set up a WeMos board to operate 4 relays via HA. All worked fine except poor connectivity due to the location. No problem, I would just order another access point for better signal.
About 2 weeks ago the system went from poor connectivity to no connectivity. No problem I thought, it will all be fixed with a new access point.

Today I relocated another access point but there was still no connectivity … odd … I pulled the WeMos board out of the enclosure so all peripherals were gone - still no connectivity. I thought I had killed the board so hooked u a brand new WeMos and programmed it - no connectivity!
At this point I suspected the code programmed onto the WeMos via ESPHome … but recall that this worked before.
I have now confirmed that all 4 i/o assignments in the code work but for some reason or other I can only have two active at a time. I can comment out any two gpio assignments and the board connects to wifi. As soon as I have 3 or more gpio’s assigned, the board no longer connects to wifi. No other changes!
This is the ESPHome code programmed on the WeMos chip/board:


esphome:
  name: wemos_esp8266_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_iot_ssid
  password: !secret wifi_iot_password
  fast_connect: true # required when using a hidden network
  
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Wemos Esp8266 1 Fallback Hotspot"
    password: "ZU8JEmHrsxIL"
#  use_address: 192.168.50.120

#  manual_ip:
#    static_ip: 192.168.50.207
  
captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:



binary_sensor:
#  - platform: gpio
#    pin:
#      number: GPIO0
#      mode: INPUT_PULLUP
#      inverted: True
#    name: "Sonoff Basic 10 Button"
#    on_press:
#      - switch.toggle: relay
      
#  - platform: gpio  
#    pin:
#      number: GPIO3
#      mode: INPUT_PULLUP
#      inverted: True
#    name: "Sonoff Basic 10a Button"
#    on_press:
#      - switch.toggle: relay
      
# - platform: gpio  
#   pin:
#      number: GPIO3
#      mode: INPUT_PULLUP
#      inverted: True
#   name: "wemos_esp8266_1 gpio 03"
#   on_click:
#        min_length: 50ms
#        max_length: 500ms
#        then:
#          - switch.toggle: relay1     


switch:
#  - platform: gpio
#    name: "wemos_esp8266_1_gpio 4"
#    pin: GPIO4
#    id: relay1
    
  - platform: gpio
    name: "wemos_esp8266_1_gpio 5"
    pin: GPIO5
    id: relay2
 # this is the main water shutoff valve. If the switch is on then water can flow
 
  - platform: gpio
    name: "wemos_esp8266_1_gpio 12"
    pin: GPIO12
    id: relay4
    
  - platform: gpio
    name: "wemos_esp8266_1_gpio 14"
    pin: GPIO14
    id: relay3

 
status_led:
  pin:
    number: GPIO13
    inverted: yes


in this code, I have 3 gpio’s enabled to operate relays and the board will not connect to the wifi network. if I comment out one of the remaining gpio assignments, it will connect just fine.

Anybody know what is going on ?

While I haven’t got a clue what happened, I can now report that things are working again with 4 gpio pins assigned.
What I did was set up two gpio pins and the WeMos connected to the network but as it turned out, HA did not recognize the pins being available. I rebooted the host computer and the two pins were again recognized. I decided to try activating a third pin and the WeMos still connected to the network and the fourth pin worked as well.
Home Assistant had been rebooted plenty times between the device not connecting any more and now (first thing I do) so this will have to be filed under “WTF”