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:
@@ -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']
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user