mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
71636ba8a1ddde159d8610ea746dc742d0fca2af
Users (notably PollingComponents with update_interval: 0ms) have historically relied on set_interval(0) as a pseudo-loop() mechanism. A literal interval=0 causes Scheduler::call() to spin — the item is always 'due now' after re-scheduling, so the scheduler loop never returns, starves the main loop, and triggers a WDT reset in the field. Coerce interval=0 to 1ms at creation so existing code keeps working at ~1kHz instead of spinning, while still emitting the warning pointing authors at HighFrequencyLoopRequester (the intended mechanism for running fast in the main loop). Zero-delay timeouts (defer/set_timeout) remain legitimate one-shots and are unaffected — defer is a one-shot, not a spin risk.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
