J. Nick Koston da06bb9c7f [ota] Skip safe_shutdown after partition-table OTA
For OTA_TYPE_UPDATE_PARTITION_TABLE the success path runs
nvs_flash_deinit() before the final write, which leaves every
preference handle held by other components invalid. App.safe_reboot()
calls on_safe_shutdown() which tries to flush preferences, and each
flush fails with ESP_ERR_NVS_INVALID_HANDLE -- noisy log spam during
the reboot window.

App.reboot() skips the safe-shutdown callbacks and goes straight to
esp_restart(). For partition-table OTAs there is nothing useful to
flush (NVS handles are already dead, the device is moments from a
reboot anyway), so reboot directly.

App-OTA path is unchanged: safe_reboot() still runs on_safe_shutdown
so preferences are saved on the way out.
2026-05-03 18:19:24 -05:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-04-09 11:28:48 +12:00
2025-07-17 22:40:28 +12:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses 545 MiB
Languages
C++ 60.1%
Python 39.3%
C 0.3%
JavaScript 0.2%