mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
fix integration sensor (#711)
* fix integration sensor * revert rtc_.save conditional
This commit is contained in:
parent
9b28c732c6
commit
244c4be8cc
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue