Use gpio4 as ADC on shelly 1 plus

Hi,
Does anyone know if or how I can use GPIO4 (“SW” contact) on a shelly1 plus as a ADC.

The shelly1 plus uses a ESP32-U4WDH chipset. According to the datasheets for this chip, GPIO4 can be used as an “ADC” (ADC2_CH0 GPIO4), but when I try to compile it in ESPHOME, I get error “ESP32 doesn’t support ADC on this pin”

[https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf]

esphome:
  name: shelly-plus-1
  platformio_options:
    board_build.f_cpu: 160000000L

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    version: latest
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y