Enabling 'magic switch mode' for sonoff basic R4 on tasmota

i had issues with the component a little but here is how I fixed that in case anyone is interested: ESPHome - Sonoff R4 Magic Switch - debounce YAML