mirror of
https://github.com/esphome/esphome.git
synced 2024-11-04 09:01:53 +01:00
fix integration sensor (#711)
* fix integration sensor * revert rtc_.save conditional
This commit is contained in:
parent
9b28c732c6
commit
244c4be8cc
@ -61,7 +61,9 @@ void IntegrationSensor::process_sensor_value_(float value) {
|
||||
area = dt * new_value;
|
||||
break;
|
||||
}
|
||||
this->publish_and_save_(this->last_value_ + area);
|
||||
this->last_value_ = new_value;
|
||||
this->last_update_ = now;
|
||||
this->publish_and_save_(this->result_ + area);
|
||||
}
|
||||
|
||||
} // namespace integration
|
||||
|
Loading…
Reference in New Issue
Block a user