ESPHome  2022.11.3
Public Member Functions | Protected Attributes
esphome::sensor::MultiplyFilter Class Reference

A simple filter that multiplies to each value it receives by multiplier. More...

#include <filter.h>

Inheritance diagram for esphome::sensor::MultiplyFilter:
esphome::sensor::Filter

Public Member Functions

 MultiplyFilter (float multiplier)
 
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 multiplier_
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

A simple filter that multiplies to each value it receives by multiplier.

Definition at line 265 of file filter.h.

Constructor & Destructor Documentation

◆ MultiplyFilter()

esphome::sensor::MultiplyFilter::MultiplyFilter ( float  multiplier)
explicit

Definition at line 279 of file filter.cpp.

Member Function Documentation

◆ new_value()

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

Implements esphome::sensor::Filter.

Definition at line 281 of file filter.cpp.

Field Documentation

◆ multiplier_

float esphome::sensor::MultiplyFilter::multiplier_
protected

Definition at line 272 of file filter.h.


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