Skip to content

Commit

Permalink
Added dynamic delay mechanism for Non-NASA protocol registration
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfaruk-aran committed Nov 1, 2024
1 parent 5a76591 commit 7933012
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/samsung_ac/protocol_non_nasa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7933012

Please sign in to comment.