Sonoff basic r1 - code change can't connect to wifi

Tags: #<Tag:0x00007f739e907220> #<Tag:0x00007f739e907130>

Hello,
When I flash simple sonoff basic r1 esphome code:

esphome:
  name: grzalka_zasobnik
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "voboIOT"
  password: "xxxxxxxxxxxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Grzalka Zasobnik"
    password: "xxxxxxxxxxxxxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "xxxxxxxxxxxxxxxx"

ota:

everything works - meaning sonoff connect to wifi and I can reflash it OTA
but when I add those lines to esphome:

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

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

status_led:
  pin:
    number: GPIO13
    inverted: yes

sonoff cannot connect to wifi:

Using 'COM8' as serial port.
Showing logs:
[23:13:37][D][wifi:319]: Found networks:
[23:13:37][I][wifi:365]: - 'voboIOT' (C4:AD:34:F6:D0:A8) ▂▄▆█
[23:13:37][D][wifi:366]:     Channel: 1
[23:13:37][D][wifi:367]:     RSSI: -66 dB
[23:13:37][I][wifi:365]: - 'voboIOT' (C4:AD:34:F6:E9:E4) ▂▄▆█
[23:13:37][D][wifi:366]:     Channel: 9
[23:13:37][D][wifi:367]:     RSSI: -65 dB
[23:13:37][D][wifi:369]: - 'Grzalka Zasobnik' (6A:C6:3A:81:06:D5) ▂▄▆█
[23:13:37][D][wifi:369]: - 'WLAN1-4JJNNM' (B4:86:55:87:D4:FA) ▂▄▆█
[23:13:37][I][wifi:193]: WiFi Connecting to 'voboIOT'...
[23:13:43][W][wifi_esp8266:391]: Event: Disconnected ssid='voboIOT' reason='Probe Request Unsuccessful'
[23:13:43][W][wifi:451]: Error while connecting to network.
[23:13:43][I][wifi:193]: WiFi Connecting to 'voboIOT'...
[23:13:49][W][wifi_esp8266:391]: Event: Disconnected ssid='voboIOT' reason='Probe Request Unsuccessful'
[23:13:49][W][wifi:451]: Error while connecting to network.
[23:13:54][D][wifi:304]: Starting scan...
[23:14:00][D][wifi:319]: Found networks:
[23:14:00][I][wifi:365]: - 'voboIOT' (C4:AD:34:F6:E9:E4) ▂▄▆█
[23:14:00][D][wifi:366]:     Channel: 9
[23:14:00][D][wifi:367]:     RSSI: -64 dB
[23:14:00][I][wifi:365]: - 'voboIOT' (C4:AD:34:F6:D0:A8) ▂▄▆█
[23:14:00][D][wifi:366]:     Channel: 1
[23:14:00][D][wifi:367]:     RSSI: -65 dB
[23:14:00][D][wifi:369]: - 'Grzalka Zasobnik' (6A:C6:3A:81:06:D5) ▂▄▆█
[23:14:00][D][wifi:369]: - 'WLAN1-4JJNNM' (B4:86:55:87:D4:FA) ▂▄▆█
[23:14:00][I][wifi:193]: WiFi Connecting to 'voboIOT'...
[23:14:06][W][wifi_esp8266:391]: Event: Disconnected ssid='voboIOT' reason='Probe Request Unsuccessful'
[23:14:06][W][wifi:451]: Error while connecting to network.
[23:14:06][I][wifi:193]: WiFi Connecting to 'voboIOT'...
[23:14:12][W][wifi_esp8266:391]: Event: Disconnected ssid='voboIOT' reason='Probe Request Unsuccessful'
[23:14:12][W][wifi:451]: Error while connecting to network.

I will be greatful for any help

Maciek

Check it out here: https://github.com/esphome/issues/issues/952

thanks for help.
upgrade to 1.15.0 stable solves the problem

sorry, I was wrong;
no luck
this part breaks wifi connection:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "pompa recyrkulacja przycisk"
    on_press:
      - switch.toggle: relay_pompa_recyrkulacja