ESPHome  2024.11.3
Public Member Functions | Protected Attributes
esphome::sensor::ClampFilter Class Reference

#include <filter.h>

Inheritance diagram for esphome::sensor::ClampFilter:
esphome::sensor::Filter

Public Member Functions

 ClampFilter (float min, float max, bool ignore_out_of_range)
 
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. More...
 
void input (float value)
 
void output (float value)
 

Protected Attributes

float min_ {NAN}
 
float max_ {NAN}
 
bool ignore_out_of_range_
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

Definition at line 413 of file filter.h.

Constructor & Destructor Documentation

◆ ClampFilter()

esphome::sensor::ClampFilter::ClampFilter ( float  min,
float  max,
bool  ignore_out_of_range 
)

Definition at line 444 of file filter.cpp.

Member Function Documentation

◆ new_value()

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

Implements esphome::sensor::Filter.

Definition at line 446 of file filter.cpp.

Field Documentation

◆ ignore_out_of_range_

bool esphome::sensor::ClampFilter::ignore_out_of_range_
protected

Definition at line 421 of file filter.h.

◆ max_

float esphome::sensor::ClampFilter::max_ {NAN}
protected

Definition at line 420 of file filter.h.

◆ min_

float esphome::sensor::ClampFilter::min_ {NAN}
protected

Definition at line 419 of file filter.h.


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