2#ifdef USE_BINARY_SENSOR_FILTER
11static const char *
const TAG =
"sensor.filter";
14 if (this->
next_ ==
nullptr) {
100 [
this,
val]() { this->next_value_(!val); });
110 this->steady_ = true;
bool next(T value)
Feeds the next item in the series to the deduplicator and returns false if this is a duplicate.
optional< bool > new_value(bool value) override
void next_value_(bool val)
const AutorepeatFilterTiming * timings_
void send_state_internal(bool new_state)
optional< bool > new_value(bool value) override
TemplatableFn< uint32_t > delay_
optional< bool > new_value(bool value) override
TemplatableFn< uint32_t > delay_
TemplatableFn< uint32_t > on_delay_
TemplatableFn< uint32_t > off_delay_
optional< bool > new_value(bool value) override
virtual void input(bool value)
virtual optional< bool > new_value(bool value)=0
Deduplicator< bool > dedup_
optional< bool > new_value(bool value) override
LambdaFilter(std::function< optional< bool >(bool)> f)
std::function< optional< bool >(bool)> f_
optional< bool > new_value(bool value) override
TemplatableFn< uint32_t > delay_
optional< bool > new_value(bool value) override
TemplatableFn< uint32_t > timeout_delay_
void input(bool value) override
void HOT delay(uint32_t ms)
Application App
Global storage of Application pointer - only one Application can exist.