ESP32 web_server gives failed config

Trying to add web_server component to shelly plus 1pm gives me

Failed config

json: None
  {}
async_tcp: None
  {}

It works on my sonoff basic, but of course that is a different chip.
I found one old similar message in google, but that was about adding async_tcp to init.py, and I checked, it is there already, and that case was closed with an update in GitHub?

Any idea’s?
relevant yaml:

ubstitutions:
  device_name: "Shelly Plus 1"
  # Higher value gives lower watt readout
  current_res: "0.001"
  # Lower value gives lower voltage readout
  voltage_div: "1925"

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

esp32:
  board: esp32doit-devkit-v1
  #  board: esp32doit-espduino
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_160: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: "160"

preferences:
  # 10 minutes to increase lifespan of device 10 fold
  # Need to check how this affects energy, I hope that is in RTC
  flash_write_interval: 10min
  #restore_from_flash : true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

web_server:
  port: 80
  # auth:
  #   username: admin
  #   password: !secret web_server_password

logger:

api:
  password: !secret api_password
#  encryption:
#    key: !secret api_encryption_key

Is the missing s from substitutions a copy paste error ?

that missing first s is indeed not missing from the actual source.

I’m needing to flash one of these with ESPHome too.

How did it work out?

Would you mind sharing your working config to get me started?

I went back to Tasmota.

I still believe ESPHome has better potential for local logic, but the lack of fall-back SSID combined with my lack of yaml skills made me go back to what I know.