Prevent repeated report settings in a sequence
This commit is contained in:
@@ -21,15 +21,7 @@ substitutions:
|
||||
|
||||
api:
|
||||
on_client_connected:
|
||||
- delay: 15s
|
||||
- lambda: |-
|
||||
static const char *const TAG = "addon_upload_tft.esphome.on_boot";
|
||||
ESP_LOGI(TAG, "TFT URL: %s", id(tft_url).c_str());
|
||||
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}");
|
||||
- script.execute: report_settings
|
||||
|
||||
services:
|
||||
##### SERVICE TO UPDATE THE TFT FILE from URL #####
|
||||
@@ -164,6 +156,19 @@ script:
|
||||
#endif
|
||||
page_id->update();
|
||||
|
||||
- id: report_settings
|
||||
mode: restart
|
||||
then:
|
||||
- delay: 15s
|
||||
- lambda: |-
|
||||
static const char *const TAG = "addon_upload_tft.script.report_settings";
|
||||
ESP_LOGI(TAG, "TFT URL: %s", id(tft_url).c_str());
|
||||
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
|
||||
mode: restart
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user