ESPHome  2022.6.3
Public Member Functions | Protected Attributes
esphome::sensor::DeltaFilter Class Reference

#include <filter.h>

Inheritance diagram for esphome::sensor::DeltaFilter:
esphome::sensor::Filter

Public Member Functions

 DeltaFilter (float min_delta)
 
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_delta_
 
float last_value_ {NAN}
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

Definition at line 326 of file filter.h.

Constructor & Destructor Documentation

◆ DeltaFilter()

esphome::sensor::DeltaFilter::DeltaFilter ( float  min_delta)
explicit

Definition at line 309 of file filter.cpp.

Member Function Documentation

◆ new_value()

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

Implements esphome::sensor::Filter.

Definition at line 310 of file filter.cpp.

Field Documentation

◆ last_value_

float esphome::sensor::DeltaFilter::last_value_ {NAN}
protected

Definition at line 334 of file filter.h.

◆ min_delta_

float esphome::sensor::DeltaFilter::min_delta_
protected

Definition at line 333 of file filter.h.


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