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) {