ESPHome 2025.5.0
Loading...
Searching...
No Matches
esphome::sensor::FilterOutValueFilter Class Reference

A simple filter that only forwards the filter chain if it doesn't receive value_to_filter_out. More...

#include <filter.h>

Inheritance diagram for esphome::sensor::FilterOutValueFilter:
esphome::sensor::Filter

Public Member Functions

 FilterOutValueFilter (std::vector< TemplatableValue< float > > values_to_filter_out)
 
optional< float > new_value (float value) override
 
- Public Member Functions inherited from esphome::sensor::Filter
virtual void initialize (Sensor *parent, Filter *next)
 Initialize this filter, please note this can be called more than once.
 
void input (float value)
 
void output (float value)
 

Protected Attributes

std::vector< TemplatableValue< float > > values_to_filter_out_
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

A simple filter that only forwards the filter chain if it doesn't receive value_to_filter_out.

Definition at line 296 of file filter.h.

Constructor & Destructor Documentation

◆ FilterOutValueFilter()

esphome::sensor::FilterOutValueFilter::FilterOutValueFilter ( std::vector< TemplatableValue< float > > values_to_filter_out)
explicit

Definition at line 301 of file filter.cpp.

Member Function Documentation

◆ new_value()

optional< float > esphome::sensor::FilterOutValueFilter::new_value ( float value)
overridevirtual

Implements esphome::sensor::Filter.

Definition at line 304 of file filter.cpp.

Field Documentation

◆ values_to_filter_out_

std::vector<TemplatableValue<float> > esphome::sensor::FilterOutValueFilter::values_to_filter_out_
protected

Definition at line 303 of file filter.h.


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