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!"