fix integration sensor (#711)

* fix integration sensor

* revert rtc_.save conditional
This commit is contained in:
Guillermo Ruffino 2019-08-31 13:45:06 -03:00 committed by Otto Winter
parent 9b28c732c6
commit 244c4be8cc

View file

@ -61,7 +61,9 @@ void IntegrationSensor::process_sensor_value_(float value) {
area = dt * new_value; area = dt * new_value;
break; 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 } // namespace integration