|
ESPHome 2026.5.1
|
A simple filter that replaces a substring with another substring. More...
#include <filter.h>
Public Member Functions | |
| SubstituteFilter (const std::initializer_list< Substitution > &substitutions) | |
| bool | new_value (std::string &value) override |
Public Member Functions inherited from esphome::text_sensor::Filter | |
| virtual void | initialize (TextSensor *parent, Filter *next) |
| Initialize this filter, please note this can be called more than once. | |
| void | input (std::string value) |
| void | output (std::string &value) |
Protected Attributes | |
| std::array< Substitution, N > | substitutions_ {} |
Protected Attributes inherited from esphome::text_sensor::Filter | |
| friend | TextSensor |
| Filter * | next_ {nullptr} |
| TextSensor * | parent_ {nullptr} |
A simple filter that replaces a substring with another substring.
N is set by code generation to match the exact number of substitutions configured in YAML.
|
inlineexplicit |
|
inlineoverridevirtual |
Implements esphome::text_sensor::Filter.
|
protected |