From 793301296123b7b53c9a84191b9a2070cfcf659a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20ARAN?= Date: Fri, 1 Nov 2024 09:59:12 +0300 Subject: [PATCH] Added dynamic delay mechanism for Non-NASA protocol registration --- components/samsung_ac/protocol_non_nasa.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/samsung_ac/protocol_non_nasa.cpp b/components/samsung_ac/protocol_non_nasa.cpp index 42e2389a..8db426bf 100644 --- a/components/samsung_ac/protocol_non_nasa.cpp +++ b/components/samsung_ac/protocol_non_nasa.cpp @@ -715,6 +715,11 @@ namespace esphome dynamic_delay_interval = std::min(dynamic_delay_interval * 2, max_delay_interval); } } + else + { + // Reset the delay interval if the registration was successful + dynamic_delay_interval = 10000; // Reset to initial delay + } // Remove messages from the queue that have been waiting for more than 15 seconds nonnasa_requests.remove_if([&](const NonNasaRequestQueueItem &item)