Flag display as disconnected during upload
To prevent Blueprint sending data
This commit is contained in:
@@ -187,6 +187,17 @@ script:
|
||||
condition:
|
||||
- lambda: return (current_page->state == "confirm");
|
||||
timeout: 2s
|
||||
- script.execute:
|
||||
id: report_upload_progress
|
||||
message: "Set Nextion unavailable for blueprint calls"
|
||||
- script.wait: report_upload_progress
|
||||
- binary_sensor.template.publish:
|
||||
id: nextion_init
|
||||
state: false
|
||||
- script.execute:
|
||||
id: report_upload_progress
|
||||
message: "Preparing for upload..."
|
||||
- script.wait: report_upload_progress
|
||||
# Then start the upload
|
||||
- lambda: |-
|
||||
static const char *const TAG = "addon_upload_tft.script.upload_tft";
|
||||
@@ -235,13 +246,6 @@ script:
|
||||
condition:
|
||||
- lambda: return (current_page->state == "confirm");
|
||||
timeout: 2s
|
||||
- script.execute:
|
||||
id: report_upload_progress
|
||||
message: "Set Nextion unavailable for blueprint calls"
|
||||
- script.wait: report_upload_progress
|
||||
- binary_sensor.template.publish:
|
||||
id: nextion_init
|
||||
state: false
|
||||
- script.execute:
|
||||
id: report_upload_progress
|
||||
message: "Stopping other scripts"
|
||||
|
||||
@@ -1295,7 +1295,7 @@ binary_sensor:
|
||||
entity_category: diagnostic
|
||||
icon: mdi:tablet-dashboard
|
||||
lambda: |-
|
||||
return disp1->is_setup();
|
||||
return (!id(is_uploading_tft) and disp1->is_setup());
|
||||
|
||||
##### START - BUTTON CONFIGURATION #####
|
||||
button:
|
||||
@@ -3304,7 +3304,7 @@ script:
|
||||
ESP_LOGI(TAG, " Queue size: %d", tf_uart->available());
|
||||
|
||||
// Report Nextion status
|
||||
nextion_init->publish_state(nextion_init->state and disp1->is_setup());
|
||||
nextion_init->publish_state(!id(is_uploading_tft) and nextion_init->state and disp1->is_setup());
|
||||
ESP_LOGI(TAG, "Nextion:");
|
||||
ESP_LOGI(TAG, " Queue size: %d", disp1->queue_size());
|
||||
if (disp1->is_setup())
|
||||
|
||||
Reference in New Issue
Block a user