ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
filter.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::text_sensor::Filter
 Apply a filter to text sensor values such as to_upper. More...
 
class  esphome::text_sensor::LambdaFilter
 This class allows for creation of simple template filters. More...
 
class  esphome::text_sensor::StatelessLambdaFilter
 Optimized lambda filter for stateless lambdas (no capture). More...
 
class  esphome::text_sensor::ToUpperFilter
 A simple filter that converts all text to uppercase. More...
 
class  esphome::text_sensor::ToLowerFilter
 A simple filter that converts all text to lowercase. More...
 
class  esphome::text_sensor::AppendFilter
 A simple filter that adds a string to the end of another string. More...
 
class  esphome::text_sensor::PrependFilter
 A simple filter that adds a string to the start of another string. More...
 
struct  esphome::text_sensor::Substitution
 
class  esphome::text_sensor::SubstituteFilter< N >
 A simple filter that replaces a substring with another substring. More...
 
class  esphome::text_sensor::MapFilter< N >
 A filter that maps values from one set to another. More...
 

Namespaces

namespace  esphome
 Providing packet encoding functions for exchanging data with a remote host.
 
namespace  esphome::text_sensor
 

Typedefs

using esphome::text_sensor::lambda_filter_t = std::function<optional<std::string>(std::string)>
 

Functions

bool esphome::text_sensor::substitute_filter_apply (const Substitution *substitutions, size_t count, std::string &value)
 Non-template helper (implementation in filter.cpp)
 
bool esphome::text_sensor::map_filter_apply (const Substitution *mappings, size_t count, std::string &value)
 Non-template helper (implementation in filter.cpp)