Add touch_probe and touch_reset actions to the Elecrow for a diagnosis over the API (0.2.97, firmware 0.2.83)
CI / checks (push) Has been cancelled
CI / firmware (add-on) (push) Has been cancelled
CI / firmware (min_version) (push) Has been cancelled

This commit is contained in:
Xandrossian
2026-09-21 14:03:05 -07:00
parent 4ec8c7a935
commit 6910f30d4c
8 changed files with 90 additions and 20 deletions
+18
View File
@@ -385,6 +385,7 @@ smart_display:
partitions: 4mb_wide_slots
# The GT911 out of reset through the V3.0's PCA9557 before the driver runs (elecrow_touch_reset.h, firmware 0.2.82).
elecrow_touch_reset:
id: touch_reset
i2c_id: touch_bus
address: 0x18
@@ -410,6 +411,23 @@ api:
- action: ui_snapshot
then:
- script.execute: capture_ui_snapshot
# The touch bus at a glance (firmware 0.2.83): the PCA9557's registers and whether a GT911 answers at 0x5D or 0x14.
- action: touch_probe
then:
- lambda: 'id(touch_reset).probe();'
# Elecrow's reset sequence with values of one's own, then the probe: the expander's configuration register during
# the reset (0 = every pin an output), its output register while the reset is held and after the release, the two
# waits in ms, and the configuration afterwards. Elecrow's own values: 0, 0, 1, 20, 100, 2.
- action: touch_reset
variables:
config: int
low: int
high: int
hold_ms: int
wait_ms: int
final_config: int
then:
- lambda: 'id(touch_reset).reset(config, low, high, hold_ms, wait_ms, final_config);'
# A camera full screen from Home Assistant (firmware 0.2.57+), as a tap on its tile opens it; an empty entity closes
# it. Only a camera on the screen's tiles or in a recent alert gets an image from ESP Screens.
- action: preview_camera
+1 -1
View File
@@ -14,7 +14,7 @@
# fonts/materialdesignicons-webfont.ttf (Apache 2.0, github.com/Templarian/MaterialDesign-Webfont).
############################################################
substitutions:
SCREEN_FIRMWARE_VERSION: "0.2.82"
SCREEN_FIRMWARE_VERSION: "0.2.83"
DASHBOARD_INBOX_INTERNAL: "false"
CALIBRATION_ON_BOOT: "false" # a bench build: start on the touch test page
ROOM_NAME: "" # top left until ESP Screens sends the screen name