1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-02 10:02:23 +01:00
This commit is contained in:
J. Nick Koston
2025-07-06 18:36:05 -05:00
parent 2759f3828e
commit ba8f3d3f63

View File

@@ -129,7 +129,7 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type
// If name is provided, do atomic cancel-and-add
if (name_cstr != nullptr && name_cstr[0] != '\0') {
// Cancel existing items
this->cancel_item_locked_(component, name_cstr, type, delay == 0 && type == SchedulerItem::TIMEOUT);
this->cancel_item_locked_(component, name_cstr, type, false);
}
// Add new item directly to to_add_
// since we have the lock held