With the release of the new home assistant voice hardware I gave up trying to get the S3 Box to do voice consistently.
I recently converted my lanbon L8’s to ESPHome/lvgl from Openhasp and decided to give it a go on the S3Box.
I have added a dht11 for temperature and a BH1750 as a light sensor. Using the light sensor I can dim the screen at night.
(probably need to add in the anti burn in at some point!)
The major headache was trying to figure out how to change pages with a swipe rather than a button - it appears the docs are not quite correct so I have raised an issue.
the full yaml is here [GitHub - jtbnz/ESPHome-ESP32-S3-Box-3-Bedside-Clock: Esphome yaml configuration for a touch screen bedside clock]
the swipe detection:
on_update:
- lambda: |-
for (auto touch: touches) {
//ESP_LOGI("touchscreen on_update", "state=%d x=%d, y=%d, x_prev=%d, y_prev=%d, x_org=%d, y_org=%d", touch.state, touch.x, touch.y,touch.x_prev,touch.y_prev,touch.x_org,touch.y_org);
if ((touch.state == 6) && (id(change_page).state)) {
if (touch.x_org > touch.x_prev) {
ESP_LOGI("touchscreen on_update", "Detected RIGHT to LEFT Swipe in clock area");
id(page_prev).execute();
} else {
ESP_LOGI("touchscreen on_update", "Detected LEFT to RIGHT Swipe in clock area");
id(page_next).execute();
}
}
}
it checks that the swipe occured over the clock by using a binary sensor called change_page
- platform: touchscreen
name: change_page_vb
id: change_page
x_min: 0
y_min: 0
y_max: 100
x_max: 300