From 584dd30eb5859b5cced0c6553aefaff8fc583d50 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 14 Jun 2021 21:44:04 -0400 Subject: [PATCH] Allowed quicker syncing and showing of more recent data synced from ecobee --- api/runtime.php | 2 +- js/beestat/runtime_sensor.js | 2 +- js/beestat/runtime_thermostat.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/runtime.php b/api/runtime.php index 03850ba..ff882a1 100644 --- a/api/runtime.php +++ b/api/runtime.php @@ -16,7 +16,7 @@ class runtime extends cora\api { ]; public static $cache = [ - 'sync' => 900 // 15 Minutes + 'sync' => 300 // 5 Minutes ]; /** diff --git a/js/beestat/runtime_sensor.js b/js/beestat/runtime_sensor.js index ccde640..a9c7f1f 100644 --- a/js/beestat/runtime_sensor.js +++ b/js/beestat/runtime_sensor.js @@ -68,7 +68,7 @@ beestat.runtime_sensor.get_data = function(thermostat_id, range) { range.dynamic, 'day' ); - end_m = moment().subtract(1, 'hour'); + end_m = moment(); } else { begin_m = moment( range.static_begin + ' 00:00:00' diff --git a/js/beestat/runtime_thermostat.js b/js/beestat/runtime_thermostat.js index 8ded684..85ad7b9 100644 --- a/js/beestat/runtime_thermostat.js +++ b/js/beestat/runtime_thermostat.js @@ -120,7 +120,7 @@ beestat.runtime_thermostat.get_data = function(thermostat_id, range, key) { range.dynamic, 'day' ); - end_m = moment().subtract(1, 'hour'); + end_m = moment(); } else { begin_m = moment( range.static_begin + ' 00:00:00'