1
0
mirror of https://github.com/beestat/app.git synced 2026-05-13 10:52:29 -04:00

Removing firstConnected as a requirement for unique thermostats.

Turns out ecobee is sometimes changing firstConnected (on four thermostats so far, see #203). Since this field is no longer reliable, switching to serial number (identifier) only.
This commit is contained in:
Jon Ziebell
2019-12-19 21:15:58 -05:00
parent 23cefc3834
commit 08403cedc6
3 changed files with 6 additions and 11 deletions
+1 -3
View File
@@ -100,14 +100,12 @@ class ecobee_sensor extends cora\crud {
// Loop over the returned sensors and create/update them as necessary.
$sensor_ids_to_keep = [];
foreach($response['thermostatList'] as $thermostat_api) {
$guid = sha1($thermostat_api['identifier'] . $thermostat_api['runtime']['firstConnected']);
$ecobee_thermostat = $this->api(
'ecobee_thermostat',
'get',
[
'attributes' => [
'guid' => $guid
'identifier' => $thermostat_api['identifier']
]
]
);