From 492ea38d924fbd2ad8fdebe50da27c2694b06f33 Mon Sep 17 00:00:00 2001 From: oarcher Date: Thu, 18 Jul 2024 19:09:56 +0200 Subject: [PATCH] fix unreachable wdt --- esphome/components/modem/modem_component.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/modem/modem_component.cpp b/esphome/components/modem/modem_component.cpp index 0b2afc6675..6cea5d0830 100644 --- a/esphome/components/modem/modem_component.cpp +++ b/esphome/components/modem/modem_component.cpp @@ -498,9 +498,11 @@ bool ModemComponent::get_imei(std::string &result) { bool ModemComponent::modem_ready() { // check if the modem is ready to answer AT commands std::string imei; + bool status; set_wdt(60); - return this->get_imei(imei); + status = this->get_imei(imei); set_wdt(CONFIG_TASK_WDT_TIMEOUT_S); + return status; } void ModemComponent::add_on_state_callback(std::function &&callback) {