save temp_yesterday in KVS upon new day

This commit is contained in:
Gilles Grandou 2022-09-01 22:02:56 +02:00
parent 34143560a7
commit 3da8b1c4d5
1 changed files with 8 additions and 0 deletions

View File

@ -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