From 597b1b2abdf1a7a2492399257bf29f459a8d29cf Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:49:32 +0200 Subject: [PATCH] Use exit reparse mode from Nextion library This is part of the preparation for esp-idf framework --- nspanel_esphome.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 92e1c88..d5b5dce 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -100,15 +100,18 @@ uart: rx_pin: 17 baud_rate: 115200 +external_components: + - source: github://pr#3256 # adds esp-idf support to http_request + components: + - http_request + - source: github://pr#5484 # adds exit reparse to Nextion library + components: + - nextion + ##### HTTP REQUEST ##### # Enables http client # # for upload_tft. # -# pr#3256 adds esp-idf # ######################## -external_components: - - source: github://pr#3256 - components: - - http_request http_request: id: httpclient @@ -170,7 +173,7 @@ api: id(update_alarm_icon).execute("home.bt_alarm", state.c_str()); // Is page Alarm visible? - if (id(current_page).state == "alarm") + if (id(current_page).state == "alarm") // To do: This page constructor should be moved to Blueprint { // Update alarm page id(entity_id) = entity; @@ -2466,10 +2469,8 @@ script: return upload_end_(false); } - send_nextion_command("DRAKJHSUYDGBNCJHGJKSHBDN"); - send_nextion_command("recmod=0"); - send_nextion_command("recmod=0"); - send_nextion_command("connect"); + ESP_LOGD("script.upload_tft.upload_tft", "Setting Nextion protocol reparse mode to passive"); + id(disp1).set_protocol_reparse_mode(false); is_updating_ = true;