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