diff --git a/pool.js b/pool.js index 6cb7f52..62933f8 100644 --- a/pool.js +++ b/pool.js @@ -250,6 +250,18 @@ function update_temp(temp) { status.lock_update = false; } +// Set initial yesterday temp from KVS +Shelly.call ( + "KVS.Get", + { key: "pool.temp_yesterday" }, + function (result) { + if (result) { + status.temp_yesterday = result.value; + print("[POOL] Restore from KVS: temp_yesterday:", status.temp_yesterday); + } + } +) + // receives update from Pool Sensor // - trigger all temperature and pump updates