4 Commits

Author SHA1 Message Date
Edward Firmo
ec35a07f52 Fix call to older upload_tft() 2023-11-28 14:46:16 +01:00
Edward Firmo
d81a15195b Fix Nextion not communicating with ESPHome 2023.11.6 2023-11-28 14:42:19 +01:00
Edward Firmo
58cffafefc Remove is_detected 2023-11-28 14:36:36 +01:00
Edward Firmo
58b82b8a30 Remove reference to PR5683 2023-11-28 14:35:16 +01:00
4 changed files with 16 additions and 12 deletions

2
.gitignore vendored
View File

@@ -11,3 +11,5 @@ Nextion2Text.*
# Ignore dev folder # Ignore dev folder
dev dev
nspanel_esphome_prebuilt.yaml

View File

@@ -98,6 +98,7 @@ packages:
- Don't show thermostat chip when state is `auto` and no action is available. - Don't show thermostat chip when state is `auto` and no action is available.
- Fallback to legacy forecast (attributes based) when new method (service based) fails. - Fallback to legacy forecast (attributes based) when new method (service based) fails.
- Fix custom buttons icons not updating on Home page - Fix custom buttons icons not updating on Home page
- Fix Nextion not communicating with ESPHome 2023.11.6
   
## Details of noteworthy changes ## Details of noteworthy changes

View File

@@ -13,10 +13,10 @@ substitutions:
# nextion_update_blank_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/custom_configuration/nspanel_blank.tft" # nextion_update_blank_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/custom_configuration/nspanel_blank.tft"
############################################## ##############################################
external_components: #external_components:
- source: github://pr#5683 # Remove this when that pr is merged # - source: github://pr#5683 # Remove this when that pr is merged
components: # components:
- nextion # - nextion
button: button:
##### UPDATE TFT DISPLAY ##### ##### UPDATE TFT DISPLAY #####
@@ -94,7 +94,8 @@ script:
exit_reparse->execute(); exit_reparse->execute();
delay_seconds_(2); delay_seconds_(2);
ESP_LOGV(TAG, "Calling upload from Nextion component"); ESP_LOGV(TAG, "Calling upload from Nextion component");
if (disp1->upload_tft()) id(restart_nspanel).press(); disp1->upload_tft();
id(restart_nspanel).press();
ESP_LOGD(TAG, "Turn off Nextion"); ESP_LOGD(TAG, "Turn off Nextion");
screen_power->turn_off(); screen_power->turn_off();
delay_seconds_(3); delay_seconds_(3);

View File

@@ -27,12 +27,12 @@ esphome:
timeout: 60s timeout: 60s
- wait_until: - wait_until:
condition: condition:
- lambda: !lambda return disp1->is_detected(); - lambda: !lambda return disp1->is_setup();
timeout: 20s timeout: 20s
- script.execute: exit_reparse - script.execute: exit_reparse
- wait_until: - wait_until:
condition: condition:
- lambda: !lambda return disp1->is_detected(); - lambda: !lambda return disp1->is_setup();
timeout: 20s timeout: 20s
- lambda: |- - lambda: |-
static const char *const TAG = "on_boot"; static const char *const TAG = "on_boot";
@@ -50,7 +50,7 @@ esphome:
}; };
nextion_status->execute(); nextion_status->execute();
if (not disp1->is_detected()) { if (not disp1->is_setup()) {
ESP_LOGE(TAG, "No response from Nextion display"); ESP_LOGE(TAG, "No response from Nextion display");
ESP_LOGD(TAG, "Turn off Nextion"); ESP_LOGD(TAG, "Turn off Nextion");
screen_power->turn_off(); screen_power->turn_off();
@@ -62,12 +62,12 @@ esphome:
} }
- wait_until: - wait_until:
condition: condition:
- lambda: !lambda return disp1->is_detected(); - lambda: !lambda return disp1->is_setup();
timeout: 20s timeout: 20s
- lambda: |- - lambda: |-
static const char *const TAG = "on_boot"; static const char *const TAG = "on_boot";
nextion_status->execute(); nextion_status->execute();
if (not disp1->is_detected()) { if (not disp1->is_setup()) {
ESP_LOGE(TAG, "No response from Nextion display"); ESP_LOGE(TAG, "No response from Nextion display");
} }
ESP_LOGD(TAG, "Finished"); ESP_LOGD(TAG, "Finished");
@@ -2646,7 +2646,7 @@ script:
- lambda: |- - lambda: |-
static const char *const TAG = "script.nextion_status"; static const char *const TAG = "script.nextion_status";
ESP_LOGD(TAG, "Nextion status:"); ESP_LOGD(TAG, "Nextion status:");
ESP_LOGD(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False"); //ESP_LOGD(TAG, " Is detected: %s", disp1->is_detected() ? "True" : "False");
ESP_LOGD(TAG, " Is setup: %s", disp1->is_setup() ? "True" : "False"); ESP_LOGD(TAG, " Is setup: %s", disp1->is_setup() ? "True" : "False");
##### ADD-ONS ############################################################ ##### ADD-ONS ############################################################