Esphome yaml for Sunton CYD ESP32-2432S028 2usb version

hi, can’t get it working , display here is ST7789 here’s what I have so far, it’s almost working, but touch seems not , it was generated with using chatgpt, looking for help

esphome:
  name: esp32st7789v

esp32:
  board: esp32dev
  framework:
    type: arduino

wifi:
  ssid: "--"
  password: "--"
  ap:
    ssid: "ESP32_Fallback_AP"
    password: "fallback_password"

logger:

api:

ota:
  platform: esphome

spi:
  - id: tft
    clk_pin: 14
    mosi_pin: 13
    # miso_pin: 12

output:
  - id: backlight_pwm
    platform: ledc
    pin: 21
    frequency: 1000 Hz
    inverted: false

light:
  - platform: monochromatic
    id: backlight
    output: backlight_pwm
    name: "Display Backlight"
    restore_mode: ALWAYS_ON

font:
  - file: "fonts/DejaVuSans.ttf"
    id: my_font
    size: 20

display:
  - platform: ili9xxx
    model: ST7789V
    id: main_display
    spi_id: tft
    cs_pin:
      number: 15
      ignore_strapping_warning: true
    dc_pin:
      number: 2
      ignore_strapping_warning: true
    reset_pin: 0
    rotation: 90
    invert_colors: false
    color_palette: 8BIT
    update_interval: 1s
    dimensions:
      width: 240
      height: 320

lvgl:
  buffer_size: 20%
  displays:
    - main_display
  widgets:
    - button:
        id: my_button
        align: CENTER
        width: 120
        height: 50
        widgets:
          - label:
              align: CENTER
              text: "Press me"
              text_font: my_font
              text_color: WHITE
        on_click:
          then:
            - logger.log: "Button pressed!"

You do not have a touchscreen: section.

Also - a quick search of the forum comes up with this:

thanks, already tried it before, but it compiles with error due to changes in last esphome.
Also my board has ST7789V instead of ILI9341. Both problems were fixed using chatgpt,
concerning touch, if I add touch section from the example, error is
Couldn't find ID 'touch'. Please check you have defined an ID with that name in your configuration. I’m not familiar with this… may try chatgpt again, but it usually cause new problems

This works with the version of that screen I have.

tried, got ERROR Running command failed: This chip is ESP32 not ESP32-S3. Wrong --chip argument?

I linked that post for you to look at the touchscreen component, you stated you already had the screen working.

Did you read the ESPHome docs I linked for your touchscreen? The touchscreen component requires a SPI configuration, which is in the example I linked.

OK, sounds like they changed the screen in your version. It’s not the one I have. It would be good to see a picture of the back of the screen and also a link to where you got it. That way the community can help you get it working.