From 1120236f0638bae55891f69c1cf80b4eddb5260c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 28 Nov 2025 19:32:06 -0600 Subject: [PATCH] Revert "[api] Use shared static string for reboot timeout scheduler name" This reverts commit bd958c5859dc997d59de00015bb9143ed5967093. --- esphome/components/api/api_server.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/esphome/components/api/api_server.cpp b/esphome/components/api/api_server.cpp index 85ccf5ca291..c6f8b2079e2 100644 --- a/esphome/components/api/api_server.cpp +++ b/esphome/components/api/api_server.cpp @@ -112,11 +112,9 @@ void APIServer::setup() { #endif } -static const char *const REBOOT_TIMEOUT = "reboot"; - void APIServer::schedule_reboot_timeout_() { this->status_set_warning(); - this->set_timeout(REBOOT_TIMEOUT, this->reboot_timeout_, []() { + this->set_timeout("api_reboot", this->reboot_timeout_, []() { if (!global_api_server->is_connected()) { ESP_LOGE(TAG, "No clients; rebooting"); App.reboot(); @@ -152,7 +150,7 @@ void APIServer::loop() { // Clear warning status and cancel reboot when first client connects if (this->clients_.size() == 1 && this->reboot_timeout_ != 0) { this->status_clear_warning(); - this->cancel_timeout(REBOOT_TIMEOUT); + this->cancel_timeout("api_reboot"); } } }