From 4fe4c569ddc955e55249c574077bec59901e51f1 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 12 Nov 2018 19:52:55 +0100 Subject: [PATCH] Update total_daily_energy.cpp --- src/esphomelib/sensor/total_daily_energy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esphomelib/sensor/total_daily_energy.cpp b/src/esphomelib/sensor/total_daily_energy.cpp index cca02032..c106b1bc 100644 --- a/src/esphomelib/sensor/total_daily_energy.cpp +++ b/src/esphomelib/sensor/total_daily_energy.cpp @@ -14,7 +14,7 @@ void TotalDailyEnergy::setup() { float recovered; if (this->pref_.load(&recovered)) { - this->publish_state(recovered); + this->publish_state_and_save_(recovered); } else { this->publish_state_and_save_(0); }