Stop all when uploading tft

This commit is contained in:
Edward Firmo
2023-11-30 21:44:43 +01:00
parent 2c4a366d7b
commit 29e0e4b8ce
3 changed files with 61 additions and 0 deletions

View File

@@ -139,6 +139,9 @@ script:
ESP_LOGD(TAG, "Starting...");
nextion_init->publish_state(false);
disp1->set_backlight_brightness(1);
disp1->hide_component("255");
stop_all->execute();
std::vector<uint8_t> buffer_;

View File

@@ -2695,3 +2695,61 @@ script:
- lambda: |-
ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Check for addon_climate");
ESP_LOGV("script.addon_climate_set_climate_friendly_name", "friendly_name: %s", friendly_name.c_str());
- id: stop_all
mode: restart
#parameters:
# exceptions: string[] # to be implemented
then:
- lambda: |-
static const char *const TAG = "script.stop_all";
ESP_LOGD(TAG, "Stopping scripts...");
timer_reset_all->stop();
timer_page->stop();
timer_dim->stop();
timer_sleep->stop();
set_brightness->stop();
set_climate->stop();
refresh_datetime->stop();
refresh_relays->stop();
refresh_wifi_icon->stop();
service_call_alarm_control_panel->stop();
service_call_climate->stop();
ha_call_service->stop();
ha_button->stop();
update_alarm_icon->stop();
update_climate_icon->stop();
set_component_color->stop();
display_wrapped_text->stop();
display_embedded_temp->stop();
check_versions->stop();
page_changed->stop();
page_alarm->stop();
page_blank->stop();
page_boot->stop();
page_buttonpage->stop();
page_climate->stop();
page_confirm->stop();
page_cover->stop();
page_entitypage->stop();
page_fan->stop();
page_home->stop();
page_keyb_num->stop();
page_light->stop();
page_media_player->stop();
page_notification->stop();
page_qrcode->stop();
page_screensaver->stop();
page_settings->stop();
page_weather->stop();
page_index_indicator->stop();
exit_reparse->stop();
boot_sequence->stop();
notification_clear->stop();
nextion_status->stop();
addon_climate_service_call->stop();
addon_climate_update_page_home->stop();
addon_climate_set_climate->stop();
addon_climate_update_page_climate->stop();
addon_climate_set_climate_friendly_name->stop();
ESP_LOGD(TAG, "Finished");