Integration sensor reset to specific value initial test

This commit is contained in:
Milan Petrzilka 2024-02-20 23:15:14 +00:00
parent 4d8b5edb1c
commit b1c33f660e
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class IntegrationSensor : public sensor::Sensor, public Component {
void set_method(IntegrationMethod method) { method_ = method; }
void set_restore(bool restore) { restore_ = restore; }
void reset() { this->publish_and_save_(0.0f); }
void reset_to_value(float value) { this->publish_and_save_(value); }
protected:
void process_sensor_value_(float value);