bool new_value(std::string &value) override
Apply a filter to text sensor values such as to_upper.
virtual bool new_value(std::string &value)=0
This will be called every time the filter receives a new value.
void output(std::string &value)
void input(std::string value)
virtual void initialize(TextSensor *parent, Filter *next)
Initialize this filter, please note this can be called more than once.
lambda_filter_t lambda_filter_
LambdaFilter(lambda_filter_t lambda_filter)
void set_lambda_filter(const lambda_filter_t &lambda_filter)
bool new_value(std::string &value) override
const lambda_filter_t & get_lambda_filter() const
bool new_value(std::string &value) override
void internal_send_state_to_frontend(const std::string &state)
bool new_value(std::string &value) override
bool new_value(std::string &value) override
std::function< optional< std::string >(std::string)> lambda_filter_t
bool map_filter_apply(const Substitution *mappings, size_t count, std::string &value)
Non-template helper (implementation in filter.cpp)
bool substitute_filter_apply(const Substitution *substitutions, size_t count, std::string &value)
Non-template helper (implementation in filter.cpp)