[safe_mode] Combine related OTA rollback log messages (#15592)

This commit is contained in:
J. Nick Koston
2026-04-08 19:30:39 -10:00
committed by GitHub
parent 46d0c29be5
commit eafc5df3f2
+6 -4
View File
@@ -55,11 +55,13 @@ void SafeModeComponent::dump_config() {
#if defined(USE_ESP32) && defined(USE_OTA_ROLLBACK) #if defined(USE_ESP32) && defined(USE_OTA_ROLLBACK)
const esp_partition_t *last_invalid = esp_ota_get_last_invalid_partition(); const esp_partition_t *last_invalid = esp_ota_get_last_invalid_partition();
if (last_invalid != nullptr) { if (last_invalid != nullptr) {
ESP_LOGW(TAG, "OTA rollback detected! Rolled back from partition '%s'", last_invalid->label); ESP_LOGW(TAG,
ESP_LOGW(TAG, "The device reset before the boot was marked successful"); "OTA rollback detected! Rolled back from partition '%s'\n"
" The device reset before the boot was marked successful",
last_invalid->label);
if (esp_reset_reason() == ESP_RST_BROWNOUT) { if (esp_reset_reason() == ESP_RST_BROWNOUT) {
ESP_LOGW(TAG, "Last reset was due to brownout - check your power supply!"); ESP_LOGW(TAG, "Last reset was due to brownout - check your power supply!\n"
ESP_LOGW(TAG, "See https://esphome.io/guides/faq.html#brownout-detector-was-triggered"); " See https://esphome.io/guides/faq.html#brownout-detector-was-triggered");
} }
} }
#endif #endif