ESPHome 2026.3.2
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::ValueListFilter esphome::sensor::Filter

Public Member Functions

 FilterOutValueFilter (std::initializer_list< 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)
 

Additional Inherited Members

- Protected Member Functions inherited from esphome::sensor::ValueListFilter
 ValueListFilter (std::initializer_list< TemplatableValue< float > > values)
 
bool value_matches_any_ (float sensor_value)
 Check if sensor value matches any configured value (with accuracy rounding)
 
- Protected Attributes inherited from esphome::sensor::ValueListFilter
FixedVector< TemplatableValue< float > > values_
 
- 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 353 of file filter.h.

Constructor & Destructor Documentation

◆ FilterOutValueFilter()

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

Definition at line 266 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 269 of file filter.cpp.


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