From 28c8f8cf4707800b86fc066e22100f6fcf84ad54 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 2 Dec 2023 17:49:02 +0100 Subject: [PATCH] Fix PowerOnState on ESP32 (#20144) --- tasmota/tasmota_support/support_esp32.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_support/support_esp32.ino b/tasmota/tasmota_support/support_esp32.ino index c322e52c8..f3e362ee3 100644 --- a/tasmota/tasmota_support/support_esp32.ino +++ b/tasmota/tasmota_support/support_esp32.ino @@ -433,9 +433,9 @@ String ESP_getResetReason(void) { uint32_t ESP_ResetInfoReason(void) { RESET_REASON reason = rtc_get_reset_reason(0); if (1 == reason) { return REASON_DEFAULT_RST; } // POWERON_RESET - if (12 == reason) { return REASON_SOFT_RESTART; } // SW_CPU_RESET / RTC_SW_CPU_RESET + if ((3 == reason) || (12 == reason)) { return REASON_SOFT_RESTART; } // SW_RESET / RTC_SW_SYS_RESET and SW_CPU_RESET / RTC_SW_CPU_RESET if (5 == reason) { return REASON_DEEP_SLEEP_AWAKE; } // DEEPSLEEP_RESET - if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET +// if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET return -1; //no "official error code", but should work with the current code base }