mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed #287 - Sync fails if first chunk of data has no viable rows
This commit is contained in:
parent
8caaa185be
commit
1f0d6e267b
@ -92,6 +92,10 @@ class runtime extends cora\api {
|
||||
1
|
||||
);
|
||||
|
||||
// Don't attempt this update if nothing was returned. This can happen
|
||||
// if data is returned from ecobee for the first time period but none
|
||||
// of it was valid.
|
||||
if(count($runtime_thermostats) === 1) {
|
||||
$this->api(
|
||||
'thermostat',
|
||||
'update',
|
||||
@ -102,6 +106,8 @@ class runtime extends cora\api {
|
||||
]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->sync_backwards($thermostat_id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user