9 namespace combination {
28 void setup()
override;
34 virtual void handle_new_value(
float value) = 0;
46 void add_source(
Sensor *
sensor, std::function<
float(
float)>
const &stddev);
47 void add_source(
Sensor *sensor,
float stddev);
53 std::vector<std::pair<Sensor *, std::function<float(float)>>>
sensor_pairs_;
59 void setup()
override;
62 this->update_variance_value_ = process_std_dev * process_std_dev * 0.001f;
67 void update_variance_();
68 void correct_(
float value,
float stddev);
74 uint32_t last_update_{0};
76 float update_variance_value_{0.f};
80 float variance_{INFINITY};
86 void setup()
override;
88 void handle_new_value(
float value);
95 void handle_new_value(
float value)
override;
102 void handle_new_value(
float value)
override;
109 void handle_new_value(
float value)
override;
116 void handle_new_value(
float value)
override;
123 void handle_new_value(
float value)
override;
130 void handle_new_value(
float value)
override;
137 void handle_new_value(
float value)
override;
void dump_config() override
const float DATA
For components that import data from directly connected sensors like DHT.
std::vector< Sensor * > sensors_
void dump_config() override
std::vector< std::pair< Sensor *, std::function< float(float)> > > sensor_pairs_
void dump_config() override
void log_config_(const LogString *combo_type)
Logs the sensor for use in dump_config.
void dump_config() override
void set_process_std_dev(float process_std_dev)
virtual void dump_config()
void dump_config() override
virtual void setup()
Where the component's initialization should happen.
void dump_config() override
float get_setup_priority() const override
void set_std_dev_sensor(Sensor *sensor)
Base class for operations that do not require an extra parameter to compute the combination.
void dump_config() override
Implementation of SPI Controller mode.
Base-class for all sensors.
esphome::sensor::Sensor * sensor
virtual void log_source_sensors()=0
Logs all source sensor's names.