mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
6ccc2b23b5fcd20d477c2ec51522be8dc6dca673
Migrates TimeoutFilterBase / TimeoutFilterLast / TimeoutFilterConfigured off Component, mirroring the migration #16132 did for the other Component-based sensor filters. They now arm/re-arm via App.scheduler.set_timeout(this, ...) keyed on the filter pointer; the scheduler cancels and replaces any pending arm in O(1) on each new_value(). Filters live for the program's lifetime, so the self-key never dangles. Net effect: this reverts the design from #11922, which moved timeout filters off the scheduler specifically because the bounded SchedulerItem pool churned on devices with many timers (LD2450 etc.). With #16172 replacing that pool with an unbounded intrusive freelist, the original churn problem is gone and the scheduler is once again the right primitive for this workload. Per-instance footprint shrinks: lose Component (second vptr, packed bookkeeping bytes, ComponentRuntimeStats block when runtime_stats: is enabled) and drop the now-unused timeout_start_time_ field. get_setup_priority() and the loop() poll go with it. Sensor timeout-filter syntax is unchanged. No user-facing change.
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%
