From ef11c67ecdf3cf7a1fc93e2254e3fafa1dabc4ab Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Thu, 1 Sep 2022 22:02:56 +0200 Subject: [PATCH] save temp_yesterday in KVS upon new day --- pool.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pool.js b/pool.js index a99c277..6cb7f52 100644 --- a/pool.js +++ b/pool.js @@ -92,6 +92,14 @@ function update_new_day() { print("[POOL] update_new_day", status.tick_day); status.temp_yesterday = status.temp_today; status.temp_today = null; + + Shelly.call( + "KVS.Set", + { key: "pool.temp_yesterday", value: status.temp_yesterday }, + function (result) { + print("[POOL] KVS set: ", JSON.stringify(result)); + } + ); } // call a chain of API calls