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
const Substitution * mappings_
bool new_value(std::string &value) override
bool new_value(std::string &value) override
const Substitution * substitutions_
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
ESPHOME_LOG_TAG(TAG, "text_sensor.filter")