1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

set_retry: add retries remaining parameter to the provided function (#4251)

This commit is contained in:
Dan Jackson
2023-01-17 17:26:32 -08:00
committed by GitHub
parent 3aa5953cd9
commit 029ac75a04
5 changed files with 25 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ class Scheduler {
bool cancel_interval(Component *component, const std::string &name);
void set_retry(Component *component, const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts,
std::function<RetryResult()> func, float backoff_increase_factor = 1.0f);
std::function<RetryResult(uint8_t)> func, float backoff_increase_factor = 1.0f);
bool cancel_retry(Component *component, const std::string &name);
optional<uint32_t> next_schedule_in();