diff --git a/esphome/cat-medication-tracker.yaml b/esphome/cat-medication-tracker.yaml index 7f04e0c..780d7b1 100644 --- a/esphome/cat-medication-tracker.yaml +++ b/esphome/cat-medication-tracker.yaml @@ -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"