Add min_save_interval to total_energy/integration for memory wear (#1665)
Co-authored-by: Andreas Hergert <andreas.hergert@otrs.com> Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
7 files changed
+35
-1
No files matched your search
@@ -16,6 +16,8 @@ void IntegrationSensor::setup() {
|
||||
}
|
||||
|
||||
this->last_update_ = millis();
|
||||
this->last_save_ = this->last_update_;
|
||||
|
||||
this->publish_and_save_(this->result_);
|
||||
this->sensor_->add_on_state_callback([this](float state) { this->process_sensor_value_(state); });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user