Sonoff Mini R4 Extreme - need assistance troubleshooting

I have followed Sonoff Mini R4 Extreme | devices.esphome.io but when I connect it to my PC using a CP2120 USB to UART controller, I can’t seem to connect (even if pressing the button).

What I have notices is that when I connect the Sonoff to power the the Blue Wifi LED does come one but this does not happen when connecting via the CP2120. Not sure if this means something?

When I did power it up, the CP2120 was still wired in and its LED came on which means it is connected correctly with respect to power.

I have checked the Tx connects to RX and visa versa.

It suddenly started working. I either was holding button down too long or too short, or there is a cold joint.

But now I am getting, “Configuration does not match the platform of the connected device. Expected an ESP32 device.”

substitutions:
  device_name: smartswitch-frontentrance

esphome:
  name: ${device_name}
  comment: "Sonoff MiniR4 Extreme"

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  - platform: esphome
    password: "xxxxx"
    
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

sensor:
  - platform: wifi_signal
    name: ${device_name} Wifi Signal Strength
    update_interval: 90s
    entity_category: "diagnostic"

  - platform: uptime
    name: ${device_name} Uptime
    update_interval: 300s
    entity_category: "diagnostic"

text_sensor:
  - platform: wifi_info
    ssid:
      name: Connected SSID
    ip_address:
      name: IP Address
    dns_address:
      name: DNS Address

#######################################
# Device specific Config Begins Below #
#######################################

status_led:
  pin:
    number: GPIO19
    inverted: true

output:
  # Physical relay on GPIO
  - platform: gpio
    pin: GPIO26
    id: relay_1

light:
  - platform: binary
    id: light_1
    name: ${device_name}
    icon: mdi:ceiling-light-multiple-outline
    restore_mode: restore_default_off
    output: relay_1

binary_sensor:
  - platform: gpio
    pin: GPIO00
    id: button
    filters:
      - invert:
      - delayed_off: 50ms
    on_press:
      - light.toggle:
          id: light_1

  - platform: gpio
    name: s1
    pin: GPIO27
    id: s1
    filters:
      - invert:
      - delayed_off: 50ms
    on_press:
      then:
        - light.turn_on:
            id: light_1
    on_release:
      then:
        - light.turn_off:
            id: light_1

Ok so I worked out that I could just add a device and let ESPHome create the initial config file. I am busy uploading that and will edit that file once done.