Add touch_probe and touch_reset actions to the Elecrow for a diagnosis over the API (0.2.97, firmware 0.2.83)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user