mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Integration sensor reset to specific value initial test
This commit is contained in:
parent
4d8b5edb1c
commit
b1c33f660e
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue