Refactor boot sequence: update display component on boot and adjust touchscreen settings; set display update interval to 2s

This commit is contained in:
Joshua King
2026-03-04 19:51:11 -05:00
parent eadb67b2fc
commit 0c3f065f64

View File

@@ -6,11 +6,11 @@ esphome:
name: ${name}
friendly_name: ${friendly_name}
on_boot:
- priority: -10
then:
- light.turn_on: backlight
- delay: 1s
- script.execute: update_display
priority: -10
then:
- light.turn_on: backlight
- delay: 1s
- component.update: my_display
esp32:
board: esp32dev
@@ -20,6 +20,8 @@ esp32:
# Enable logging
logger:
level: INFO
logs:
xpt2046: WARN
# Enable Home Assistant API
api:
@@ -77,7 +79,7 @@ display:
height: 320
id: my_display
auto_clear_enabled: false
update_interval: never
update_interval: 2s
color_palette: 8BIT
lambda: |-
// Colors
@@ -144,8 +146,8 @@ touchscreen:
id: my_touchscreen
spi_id: tft_spi
cs_pin: GPIO33
update_interval: 100ms
threshold: 400
update_interval: 250ms
threshold: 1200
calibration:
x_min: 280
x_max: 3850
@@ -255,6 +257,12 @@ script:
then:
- component.update: my_display
# Keep screen refreshed in case startup sequencing misses the first draw
interval:
- interval: 2s
then:
- component.update: my_display
# Fonts
font:
- file: "gfonts://Roboto"