mirror of
https://github.com/esphome/esphome.git
synced 2025-01-19 04:20:56 +00:00
Fixed type mismatch between result_ field and preference of integration sensor (#1178)
This commit is contained in:
parent
1b2de953d0
commit
a5e1f8fe19
@ -10,7 +10,9 @@ static const char *TAG = "integration";
|
|||||||
void IntegrationSensor::setup() {
|
void IntegrationSensor::setup() {
|
||||||
if (this->restore_) {
|
if (this->restore_) {
|
||||||
this->rtc_ = global_preferences.make_preference<float>(this->get_object_id_hash());
|
this->rtc_ = global_preferences.make_preference<float>(this->get_object_id_hash());
|
||||||
this->rtc_.load(&this->result_);
|
float preference_value = 0;
|
||||||
|
this->rtc_.load(&preference_value);
|
||||||
|
this->result_ = preference_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->last_update_ = millis();
|
this->last_update_ = millis();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user