ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
esphome::text_sensor Namespace Reference

Data Structures

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

Typedefs

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

Functions

bool substitute_filter_apply (const Substitution *substitutions, size_t count, std::string &value)
 Non-template helper (implementation in filter.cpp)
 
bool map_filter_apply (const Substitution *mappings, size_t count, std::string &value)
 Non-template helper (implementation in filter.cpp)
 
void log_text_sensor (const char *tag, const char *prefix, const char *type, TextSensor *obj)
 

Typedef Documentation

◆ lambda_filter_t

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

Definition at line 46 of file filter.h.

Function Documentation

◆ log_text_sensor()

void esphome::text_sensor::log_text_sensor ( const char * tag,
const char * prefix,
const char * type,
TextSensor * obj )

Definition at line 11 of file text_sensor.cpp.

◆ map_filter_apply()

bool esphome::text_sensor::map_filter_apply ( const Substitution * mappings,
size_t count,
std::string & value )

Non-template helper (implementation in filter.cpp)

Definition at line 91 of file filter.cpp.

◆ substitute_filter_apply()

bool esphome::text_sensor::substitute_filter_apply ( const Substitution * substitutions,
size_t count,
std::string & value )

Non-template helper (implementation in filter.cpp)

Definition at line 77 of file filter.cpp.