Sonoff basic and external switch. Can't make it work!

Hi everyone,

I’m trying to change from Tasmota to ESPHome in the wall switch I use in the kitchen. The sonoff is installed inside the box, and then it’s wired to an external switch with GPIO14.

I flashed it and have tested all kinds of configurations… but I can’t make the external switch to work! Everything else is working fine and if I click on the Sonoff button the relay toggles fine from on to off, as well as on Home Assistant config.

This is the config I have right now. Any help, please?

      - platform: gpio
           number: GPIO0
           mode: INPUT_PULLUP
           inverted: True
         name: "Sonoff Basic Button"
           - switch.toggle: fakebutton
       - platform: gpio
           number: GPIO14
           mode: INPUT_PULLUP
           inverted: True
         name: "Luz cocina"
           min_length: 50ms
           - switch.toggle: fakebutton
       - platform: status
         name: "My Status"  
       - platform: template
         name: "Luz cocina"
         optimistic: true
         id: fakebutton
         - switch.turn_on: relay
         - light.turn_on: led
         - switch.turn_off: relay
         - light.turn_off: led
       - platform: gpio
         id: relay
         pin: GPIO12
       - platform: esp8266_pwm
         id: basic_green_led
           number: GPIO13
           inverted: True
       - platform: monochromatic
         name: "Sonoff cocina Green LED"
         output: basic_green_led
         id: led
       - platform: wifi_signal
         name: "Sonoff cocina WiFi Signal"
         update_interval: 60s
       - platform: uptime
         name: "Sonoff cocina Uptime"
       - platform: version
         name: "Sonoff cocina ESPHome Version"


I’ve been changing different things for two days and, for the life of me, I can’t make it work. I’m starting to think that there is some issue with the GPIO14 in the sonoff…

Any help would be very appreciated

Did it work with tasmota ? If yes, there is nothing wrong with the hardware.

I had another Sonoff that blew up. I had to change it and put a new one, and this time I flashed ESPHome to it.

With the old one GPIO14 worked fine with Tasmota, but I did not have the chance to test it under Tasmota.

Is there a safe way to flash OTA Tasmota to it? I’m on lock down and this is the last Sonoff I have at home, with no USB flashing tool, so I don’t really want to brick it…