Prevent repeated report settings in a sequence

This commit is contained in:
Edward Firmo
2024-01-04 01:35:19 +01:00
parent 795e23aba6
commit e0d821a7ed
2 changed files with 14 additions and 9 deletions

View File

@@ -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: