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?

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

Bump

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…

Thanks