|
ESPHome 2026.8.2
|
Optimized lambda filter for stateless lambdas (no capture). More...
#include <filter.h>
Public Member Functions | |
| StatelessLambdaFilter (optional< bool >(*f)(bool)) | |
| optional< bool > | new_value (bool value) override |
Public Member Functions inherited from esphome::binary_sensor::Filter | |
| virtual void | input (bool value) |
| void | output (bool value) |
Protected Attributes | |
| optional< bool >(* | f_ )(bool) |
Protected Attributes inherited from esphome::binary_sensor::Filter | |
| friend | BinarySensor |
| Filter * | next_ {nullptr} |
| BinarySensor * | parent_ {nullptr} |
| Deduplicator< bool > | dedup_ |
Optimized lambda filter for stateless lambdas (no capture).
Uses function pointer instead of std::function to reduce memory overhead. Memory: 4 bytes (function pointer on 32-bit) vs 32 bytes (std::function).
|
inlineexplicit |
|
inlineoverridevirtual |
Implements esphome::binary_sensor::Filter.
|
protected |