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

4
.gitignore vendored
View File

@@ -10,4 +10,6 @@ Nextion2Text.*
.idea
# 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.
- Fallback to legacy forecast (attributes based) when new method (service based) fails.
- Fix custom buttons icons not updating on Home page
- Fix Nextion not communicating with ESPHome 2023.11.6
 
## 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"
##############################################
external_components:
- source: github://pr#5683 # Remove this when that pr is merged
components:
- nextion
#external_components:
# - source: github://pr#5683 # Remove this when that pr is merged
# components:
# - nextion
button:
##### UPDATE TFT DISPLAY #####
@@ -94,7 +94,8 @@ script:
exit_reparse->execute();
delay_seconds_(2);
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");
screen_power->turn_off();
delay_seconds_(3);

View File

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