ESPHome  2024.5.5
Public Member Functions | Protected Attributes
esphome::sensor::SkipInitialFilter Class Reference

Simple skip filter. More...

#include <filter.h>

Inheritance diagram for esphome::sensor::SkipInitialFilter:

Public Member Functions

 SkipInitialFilter (size_t num_to_ignore)
 Construct a SkipInitialFilter. More...
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

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

Detailed Description

Simple skip filter.

Skips the first N values, then passes everything else.

Definition at line 109 of file filter.h.

Constructor & Destructor Documentation

◆ SkipInitialFilter()

esphome::sensor::SkipInitialFilter::SkipInitialFilter ( size_t  num_to_ignore)

Construct a SkipInitialFilter.

num_to_ignoreHow many values to ignore before the filter becomes a no-op.

Definition at line 78 of file filter.cpp.

Member Function Documentation

◆ new_value()

optional< float > esphome::sensor::SkipInitialFilter::new_value ( float  value)

Implements esphome::sensor::Filter.

Definition at line 79 of file filter.cpp.

Field Documentation

◆ num_to_ignore_

size_t esphome::sensor::SkipInitialFilter::num_to_ignore_

Definition at line 120 of file filter.h.

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