8namespace binary_sensor {
10static const char *
const TAG =
"sensor.filter";
13 if (this->
next_ ==
nullptr) {
122 this->steady_ = true;
bool cancel_timeout(const std::string &name)
Cancel a timeout function.
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
bool next(T value)
Feeds the next item in the series to the deduplicator and returns false if this is a duplicate.
AutorepeatFilter(std::vector< AutorepeatFilterTiming > timings)
float get_setup_priority() const override
optional< bool > new_value(bool value) override
void next_value_(bool val)
std::vector< AutorepeatFilterTiming > timings_
void send_state_internal(bool new_state)
float get_setup_priority() const override
optional< bool > new_value(bool value) override
TemplatableValue< uint32_t > delay_
optional< bool > new_value(bool value) override
TemplatableValue< uint32_t > delay_
float get_setup_priority() const override
TemplatableValue< uint32_t > on_delay_
float get_setup_priority() const override
optional< bool > new_value(bool value) override
TemplatableValue< uint32_t > off_delay_
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
float get_setup_priority() const override
TemplatableValue< uint32_t > delay_
optional< bool > new_value(bool value) override
void input(bool value) override
TemplatableValue< uint32_t > timeout_delay_
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Providing packet encoding functions for exchanging data with a remote host.
void IRAM_ATTR HOT delay(uint32_t ms)