@homebridge-plugins/homebridge-tado 8.5.1-beta.0 → 8.5.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge-plugins/homebridge-tado",
3
- "version": "8.5.1-beta.0",
3
+ "version": "8.5.1-beta.1",
4
4
  "description": "Homebridge plugin for controlling tado° devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,7 +27,6 @@ export default (api, accessories, config, tado, telegram) => {
27
27
 
28
28
  async function setStates(accessory, accs, target, value) {
29
29
  let zoneUpdated = false;
30
- let allZonesUpdated = false;
31
30
 
32
31
  accessories = accs.filter((acc) => acc && acc.context.config.homeName === config.homeName);
33
32
 
@@ -376,7 +375,6 @@ export default (api, accessories, config, tado, telegram) => {
376
375
  }
377
376
  }
378
377
 
379
- allZonesUpdated = true;
380
378
  await tado.setPresenceLock(config.homeId, targetState);
381
379
 
382
380
  break;
@@ -428,7 +426,6 @@ export default (api, accessories, config, tado, telegram) => {
428
426
  })
429
427
  .filter((id) => id);
430
428
 
431
- allZonesUpdated = true;
432
429
  await tado.resumeShedule(config.homeId, roomIds);
433
430
 
434
431
  //Turn all back to AUTO/ON
@@ -553,7 +550,6 @@ export default (api, accessories, config, tado, telegram) => {
553
550
  .updateValue(false);
554
551
  }
555
552
 
556
- allZonesUpdated = true;
557
553
  await tado.switchAll(config.homeId, rooms);
558
554
 
559
555
  break;
@@ -570,7 +566,7 @@ export default (api, accessories, config, tado, telegram) => {
570
566
  errorHandler(err);
571
567
  } finally {
572
568
  //always update zone to set correct state in Apple Home
573
- if (zoneUpdated || allZonesUpdated) await updateZones(allZonesUpdated ? undefined : accessory.context.config.zoneId);
569
+ if (zoneUpdated) await updateZones(accessory.context.config.zoneId);
574
570
  settingState = false;
575
571
  }
576
572
  }