mirror of
https://github.com/esphome/esphome.git
synced 2025-09-11 15:52:20 +01:00
Add const char overload for Component::defer() (#9324)
This commit is contained in:
@@ -248,6 +248,9 @@ bool Component::cancel_defer(const std::string &name) { // NOLINT
|
||||
void Component::defer(const std::string &name, std::function<void()> &&f) { // NOLINT
|
||||
App.scheduler.set_timeout(this, name, 0, std::move(f));
|
||||
}
|
||||
void Component::defer(const char *name, std::function<void()> &&f) { // NOLINT
|
||||
App.scheduler.set_timeout(this, name, 0, std::move(f));
|
||||
}
|
||||
void Component::set_timeout(uint32_t timeout, std::function<void()> &&f) { // NOLINT
|
||||
App.scheduler.set_timeout(this, "", timeout, std::move(f));
|
||||
}
|
||||
|
Reference in New Issue
Block a user