diff --git a/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml b/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml index 58ef207..4e63378 100644 --- a/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml +++ b/advanced/esphome/nspanel_esphome_addon_upload_tft.yaml @@ -15,13 +15,15 @@ substitutions: ############################################## ##### DON'T CHANGE THIS ##### - upload_tft_chunk_size_max: "32768" upload_tft_baud_rate: "921600" ############################# ##### External components ##### external_components: - - source: github://pr#6192 # Remove this and update min ver when that PR is released (Hopefully v2024.2.0) + - source: + type: git + url: https://github.com/edwardtfn/esphome + ref: nextion-21 components: - nextion refresh: 300s @@ -116,24 +118,6 @@ globals: initial_value: 'esphome::nextion::Nextion::TFTUploadResult::UNKNOWN' script: - - id: nextion_uart_command - mode: queued - parameters: - command: string - then: - - lambda: |- - static const char *const TAG = "addon_upload_tft.script.nextion_uart_command"; - if (disp1->is_setup()) { - ESP_LOGD(TAG, "Sending `%s` directly to Nextion", command.c_str()); - disp1->send_command_printf(command.c_str()); - } else { - ESP_LOGD(TAG, "Sending `%s` directly to UART", command.c_str()); - tf_uart->write_str(command.c_str()); - const uint8_t to_send[3] = {0xFF, 0xFF, 0xFF}; - tf_uart->write_array(to_send, sizeof(to_send)); - } - App.feed_wdt(); - - id: nextion_upload mode: single then: @@ -180,7 +164,6 @@ script: ESP_LOGI(TAG, "Substitutions:"); ESP_LOGI(TAG, " nextion_update_url: ${nextion_update_url}"); ESP_LOGI(TAG, " nextion_update_base_url: ${nextion_update_base_url}"); - ESP_LOGI(TAG, " upload_tft_chunk_size_max: ${upload_tft_chunk_size_max}"); ESP_LOGI(TAG, " upload_tft_baud_rate: ${upload_tft_baud_rate}"); - id: report_upload_progress @@ -326,8 +309,6 @@ script: #endif disp1->set_tft_url(url.c_str()); - nextion_uart_command->execute("bkcmd=3"); - - lambda: if (id(tft_is_valid)) disp1->goto_page("home"); - delay: 2s - script.execute: open_upload_dialog @@ -499,7 +480,7 @@ script: static const char *const TAG = "addon_upload_tft.script.watchdog"; ESP_LOGI(TAG, "Add-on Upload TFT:"); ESP_LOGI(TAG, " File model: %s", tft_file_model->state.c_str()); - ESP_LOGD(TAG, " Valid TFT: %s", YESNO(id(tft_is_valid))); + ESP_LOGI(TAG, " Valid TFT: %s", YESNO(id(tft_is_valid))); } select: diff --git a/advanced/esphome/nspanel_esphome_core.yaml b/advanced/esphome/nspanel_esphome_core.yaml index 9aeba73..20a66b4 100644 --- a/advanced/esphome/nspanel_esphome_core.yaml +++ b/advanced/esphome/nspanel_esphome_core.yaml @@ -2899,7 +2899,7 @@ script: else: # Unknown TFT - lambda: |- static const char *const TAG = "script.setup_sequence"; - ESP_LOGE(TAG, "A non-compatible TFT is installed"); + ESP_LOGE(TAG, "No compatible TFT detected"); ESP_LOGE(TAG, "Display mode: %f", display_mode->state); - lambda: |- static const char *const TAG = "script.setup_sequence";