optional< std::string > new_value(std::string value) override
Apply a filter to text sensor values such as to_upper.
void output(const std::string &value)
void input(const std::string &value)
virtual void initialize(TextSensor *parent, Filter *next)
Initialize this filter, please note this can be called more than once.
virtual optional< std::string > new_value(std::string value)=0
This will be called every time the filter receives a new value.
lambda_filter_t lambda_filter_
LambdaFilter(lambda_filter_t lambda_filter)
void set_lambda_filter(const lambda_filter_t &lambda_filter)
optional< std::string > new_value(std::string value) override
const lambda_filter_t & get_lambda_filter() const
optional< std::string > new_value(std::string value) override
std::map< std::string, std::string > mappings_
optional< std::string > new_value(std::string value) override
optional< std::string > new_value(std::string value) override
std::vector< std::string > to_strings_
std::vector< std::string > from_strings_
void internal_send_state_to_frontend(const std::string &state)
optional< std::string > new_value(std::string value) override
optional< std::string > new_value(std::string value) override
std::function< optional< std::string >(std::string)> lambda_filter_t