diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 92b3fecd71..e41b4bca63 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -205,7 +205,6 @@ void APIConnection::loop() { start_time = millis(); static uint8_t max_ping_retries = 60; static uint16_t ping_retry_interval = 1000; - const uint32_t now = App.get_loop_component_start_time(); if (this->sent_ping_) { // Disconnect if not responded within 2.5*keepalive if (now - this->last_traffic_ > (KEEPALIVE_TIMEOUT_MS * 5) / 2) {