From dc305d210c548565eef2fa7554a0597aca61274b Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 16 Dec 2023 00:17:38 +0100 Subject: [PATCH] New `on_touch` event from Nextion component --- advanced/esphome/nspanel_esphome_core.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index 81790a7..8f27a49 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -764,6 +764,8 @@ display: platform: nextion uart_id: tf_uart start_up_page: 8 + on_setup: + - script.execute: boot_sequence on_page: lambda: |- static const char *const TAG = "display.disp1.on_page"; @@ -771,9 +773,9 @@ display: ESP_LOGD(TAG, "New page: %s (%i)" , id(page_names)[x].c_str(), x); current_page->publish_state(id(page_names)[x].c_str()); page_changed->execute(id(page_names)[x].c_str()); - - on_setup: - - script.execute: boot_sequence + on_touch: + lambda: |- + timer_reset_all->execute(current_page->state.c_str()); ##### START - GLOBALS CONFIGURATION ##### globals: @@ -1246,6 +1248,7 @@ sensor: on_value: then: - lambda: |- + ESP_LOGE("sensor.touchevent", "Deprecated method called!"); timer_reset_all->execute(current_page->state.c_str()); ##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####