1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 21:32:21 +01:00

[lvgl] add triggers for swipe gestures (#8190)

This commit is contained in:
Clyde Stubbs
2025-02-05 10:13:21 +11:00
committed by GitHub
parent 2e61229aed
commit 9b56f9cc6d
5 changed files with 57 additions and 10 deletions

View File

@@ -211,10 +211,9 @@ def part_schema(parts):
def automation_schema(typ: LvType):
events = df.LV_EVENT_TRIGGERS + df.SWIPE_TRIGGERS
if typ.has_on_value:
events = df.LV_EVENT_TRIGGERS + (CONF_ON_VALUE,)
else:
events = df.LV_EVENT_TRIGGERS
events = events + (CONF_ON_VALUE,)
args = typ.get_arg_type() if isinstance(typ, LvType) else []
args.append(lv_event_t_ptr)
return {