at startup, restore temp_yesterday from KVS
This commit is contained in:
parent
3da8b1c4d5
commit
016d1cf5ce
12
pool.js
12
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user