Control Jarolift covers with ESPHome and an original Remote Control

I smartified my original Jarolift remote control with ESPHome and a D1 Mini to control my TDEF shutters.

Before I tried the solution that emulates the remote with software and a C1101 tranceiver (https://community.home-assistant.io/t/control-jarolift-covers-with-esp8266-c1101-module/262224. But I could not make it 100% reliable. It usually worked for a while and then crashed,

So I decided to use my Jarolift TDRC 01 remote control and connect the buttons to relays that are controlled by a D1 Mini running ESPHome. This works very well, no crashes so far.

It looks like this:

And this is the ESPHome .yaml file for it. I programmed it so that the relays are pulsed simulating a short press of the up/down/stop buttons.

substitutions:
  switch_delay: 150ms 

esphome:
  name: esph-rollo-sz

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API

api:
  encryption:
    key: !secret api_encryption_key

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.1.241
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esph-Rollo-SZ Fallback Hotspot"
    password: !secret ap_fallback_password

captive_portal:

web_server:
  port: 80

switch:
  - platform: gpio
    name: "Rollo SZ rauf Switch"
    pin: GPIO12
    inverted: true
    interlock: &interlock [open_switch, close_switch, stop_switch]
    id: open_switch

  - platform: template 
    name: Rollo SZ Open
    turn_on_action:
      - switch.turn_on: open_switch
      - delay: ${switch_delay}
      - switch.turn_off: open_switch
    id: open_cover
      
  - platform: gpio
    name: "Rollo SZ stop Switch"
    pin: GPIO13
    inverted: true
    interlock: *interlock
    id: stop_switch
    
  - platform: template 
    name: Rollo SZ Stop
    turn_on_action:
      - switch.turn_on: stop_switch
      - delay: ${switch_delay}
      - switch.turn_off: stop_switch
    id: stop_cover

  - platform: gpio
    name: "Rollo SZ runter Switch"
    pin: GPIO14
    inverted: true
    interlock: *interlock
    id: close_switch

  - platform: template 
    name: Rollo SZ runter
    turn_on_action:
      - switch.turn_on: close_switch
      - delay: ${switch_delay}
      - switch.turn_off: close_switch
    id: close_cover


cover:
  - platform: time_based
    manual_control: true
    name: "Rollo SZ"
    id: my_cover
    open_action:
      - switch.turn_on: open_cover
    open_duration: 39s
    close_action:
      - switch.turn_on: close_cover
    close_duration: 37s
    stop_action:
      - switch.turn_on: stop_cover
  
status_led:
  pin:
    number: GPIO2