ESPHome  2024.2.0
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 delta, bool percentage_mode)
 
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 delta_
 
float current_delta_
 
bool percentage_mode_
 
float last_value_ {NAN}
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

Definition at line 358 of file filter.h.

Constructor & Destructor Documentation

◆ DeltaFilter()

esphome::sensor::DeltaFilter::DeltaFilter ( float  delta,
bool  percentage_mode 
)
explicit

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

Field Documentation

◆ current_delta_

float esphome::sensor::DeltaFilter::current_delta_
protected

Definition at line 366 of file filter.h.

◆ delta_

float esphome::sensor::DeltaFilter::delta_
protected

Definition at line 365 of file filter.h.

◆ last_value_

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

Definition at line 368 of file filter.h.

◆ percentage_mode_

bool esphome::sensor::DeltaFilter::percentage_mode_
protected

Definition at line 367 of file filter.h.


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