From b98165e077e12280bd6fb1d05d6b8b3fd2d046d2 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Mon, 9 Jun 2025 04:10:36 +0200 Subject: [PATCH] [nextion] Use safe restart to properly handle globals and restart logging (#9010) --- esphome/components/nextion/nextion_upload_arduino.cpp | 2 +- esphome/components/nextion/nextion_upload_idf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/nextion/nextion_upload_arduino.cpp b/esphome/components/nextion/nextion_upload_arduino.cpp index 1824fb8a38..2342fdfff2 100644 --- a/esphome/components/nextion/nextion_upload_arduino.cpp +++ b/esphome/components/nextion/nextion_upload_arduino.cpp @@ -353,7 +353,7 @@ bool Nextion::upload_end_(bool successful) { if (successful) { ESP_LOGD(TAG, "Restarting ESPHome"); delay(1500); // NOLINT - arch_restart(); + App.safe_reboot(); } else { ESP_LOGE(TAG, "Nextion TFT upload failed"); } diff --git a/esphome/components/nextion/nextion_upload_idf.cpp b/esphome/components/nextion/nextion_upload_idf.cpp index 03fd6e1af5..53367852ea 100644 --- a/esphome/components/nextion/nextion_upload_idf.cpp +++ b/esphome/components/nextion/nextion_upload_idf.cpp @@ -353,7 +353,7 @@ bool Nextion::upload_end_(bool successful) { if (successful) { ESP_LOGD(TAG, "Restarting ESPHome"); delay(1500); // NOLINT - arch_restart(); + App.safe_reboot(); } else { ESP_LOGE(TAG, "Nextion TFT upload failed"); }