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

#include <filter.h>

Inheritance diagram for esphome::sensor::RoundFilter:
esphome::sensor::Filter

Public Member Functions

 RoundFilter (uint8_t precision)
 
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

uint8_t precision_
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

Definition at line 424 of file filter.h.

Constructor & Destructor Documentation

◆ RoundFilter()

esphome::sensor::RoundFilter::RoundFilter ( uint8_t  precision)
explicit

Definition at line 467 of file filter.cpp.

Member Function Documentation

◆ new_value()

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

Implements esphome::sensor::Filter.

Definition at line 468 of file filter.cpp.

Field Documentation

◆ precision_

uint8_t esphome::sensor::RoundFilter::precision_
protected

Definition at line 430 of file filter.h.


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