diff --git a/esphome/components/api/api_server.cpp b/esphome/components/api/api_server.cpp index 897cf8c41f..9106e7aefa 100644 --- a/esphome/components/api/api_server.cpp +++ b/esphome/components/api/api_server.cpp @@ -105,6 +105,9 @@ void APIServer::setup() { camera::Camera::instance()->add_listener(this); } #endif + + // Initialize last_connected_ for reboot timeout tracking + this->last_connected_ = millis(); } void APIServer::loop() {