mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 13:34:07 +00:00
When no sensor filters are configured, the entire Filter class hierarchy (filter.h/filter.cpp) is still compiled and linked into the binary. This includes ~20 filter classes (sliding window, median, quantile, exponential moving average, throttle, debounce, heartbeat, delta, calibrate, clamp, NTC, streaming filters, etc.) Add USE_SENSOR_FILTER define that is only emitted when at least one sensor has filters configured. Wrap filter-related code behind this define to eliminate dead code from the binary.