ESPHome  2024.5.5
Public Member Functions | Protected Attributes
esphome::text_sensor::AppendFilter Class Reference

A simple filter that adds a string to the end of another string. More...

#include <filter.h>

Inheritance diagram for esphome::text_sensor::AppendFilter:
esphome::text_sensor::Filter

Public Member Functions

 AppendFilter (std::string suffix)
 
optional< std::string > 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. More...
 
void input (const std::string &value)
 
void output (const std::string &value)
 

Protected Attributes

std::string suffix_
 
- Protected Attributes inherited from esphome::text_sensor::Filter
friend TextSensor
 
Filternext_ {nullptr}
 
TextSensorparent_ {nullptr}
 

Detailed Description

A simple filter that adds a string to the end of another string.

Definition at line 82 of file filter.h.

Constructor & Destructor Documentation

◆ AppendFilter()

esphome::text_sensor::AppendFilter::AppendFilter ( std::string  suffix)
inline

Definition at line 84 of file filter.h.

Member Function Documentation

◆ new_value()

optional< std::string > esphome::text_sensor::AppendFilter::new_value ( std::string  value)
overridevirtual

Implements esphome::text_sensor::Filter.

Definition at line 59 of file filter.cpp.

Field Documentation

◆ suffix_

std::string esphome::text_sensor::AppendFilter::suffix_
protected

Definition at line 88 of file filter.h.


The documentation for this class was generated from the following files: