mirror of
https://github.com/esphome/esphome.git
synced 2025-01-19 04:20:56 +00: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;
|
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…
x
Reference in New Issue
Block a user