Hi x1marc,
Ich glaube ich habe gute und schlechte Nachrichten ![]()
Ich habe meinen alten Code mal mit der aktuellen ESPHome Version übersetzt und habe genau das selbe Problem wie du … Wenn ich mich richtig erinnere, dann ist der benutze MADCTL Wert für dieses Display nicht korrekt … Da es noch eine init_sequence für die display Komponente gibt kann man da sicher was machen … Da muss ich mal später schauen ![]()
Soweit die schlecht Nachricht …
Ich habe mal ein minimales Code Fragment auf lvgl Basis erstellt, welches auf Anhieb auf meinem Display funktioniert hat … Da fehlt noch dein Code, aber dass sollte auf lvgl Basis auch einfach sein und das Display sollte erstmal laufen … Für weitere Tests einfach show_test_card auf false setzen …
# Hier bitte deinen Header einfügen .. Also den Code vom Anfang bis `captive_portal:`
light:
# Set up display backlight
- platform: monochromatic
output: backlight_pwm
name: Display Backlight
id: backlight
restore_mode: ALWAYS_ON
output:
- platform: ledc
pin: GPIO21
id: backlight_pwm
# Setup SPI for the display. The ESP32-2432S028R uses separate SPI buses for display and touch
spi:
- id: tft
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
- id: touch
clk_pin: GPIO25
mosi_pin: GPIO32
miso_pin: GPIO39
display:
- platform: ili9xxx
model: ili9341
spi_id: tft
cs_pin:
number: GPIO15
ignore_strapping_warning: true
dc_pin:
number: GPIO2
ignore_strapping_warning: true
invert_colors: false
show_test_card: true
transform:
swap_xy: false
mirror_x: true
dimensions:
width: 320
height: 240
# Set up the xpt2046 touch platform
touchscreen:
platform: xpt2046
spi_id: touch
cs_pin: GPIO33
interrupt_pin: GPIO36
threshold: 400
#update_interval: 50ms
calibration:
x_min: 220
x_max: 3760
y_min: 270
y_max: 3760
transform:
mirror_x: true
mirror_y: true
swap_xy: true
lvgl:
buffer_size: 25%
Hi x1marc,
Kurzes Update … Es scheint tatsächlich in der alten Implementierung nur eine Zeile in der display Konfiguration zu fehlen … color_palette: 8bit
Mit der funktioniert bei mir dann auch die alte Implementierung wieder ![]()
Siehe auch EspHome Issue #6817
display:
- platform: ili9xxx
id: my_display
model: ILI9341
spi_id: tft
cs_pin: GPIO15
dc_pin: GPIO02
dimensions:
width: 320
height: 240
rotation: 90
invert_colors: false
color_palette: 8bit
#update_interval: 1s
lambda: |-
it.printf(30, 18, id(my_font), "%s", id(oledtext).state.c_str());