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

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## v8.5.1 - 2025-10-28
4
+ - Fix: Incorrect update of config zone properties leading to unwanted heating changes (#178)
5
+
3
6
  ## v8.5.0 - 2025-10-27
4
7
  - Change minimum polling interval to 30s due to improvements made in v8.2.0
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge-plugins/homebridge-tado",
3
- "version": "8.5.0",
3
+ "version": "8.5.1-beta.0",
4
4
  "description": "Homebridge plugin for controlling tado° devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -51,4 +51,4 @@
51
51
  "globals": "^16.4.0",
52
52
  "prettier": "^3.6.2"
53
53
  }
54
- }
54
+ }
@@ -875,36 +875,34 @@ export default (api, accessories, config, tado, telegram) => {
875
875
  }
876
876
  }
877
877
 
878
- if (idToUpdate === undefined) {
879
- const allZones = (await tado.getZones(config.homeId)) || [];
878
+ const allZones = (await tado.getZones(config.homeId)) || [];
880
879
 
881
- for (const [index, zone] of config.zones.entries()) {
882
- allZones.forEach((zoneWithID) => {
883
- if (zoneWithID.name === zone.name) {
884
- const heatAccessory = accessories.filter(
885
- (acc) => acc && acc.displayName === config.homeName + ' ' + zone.name + ' Heater'
886
- );
880
+ for (const [index, zone] of config.zones.entries()) {
881
+ allZones.forEach((zoneWithID) => {
882
+ if (zoneWithID.name === zone.name) {
883
+ const heatAccessory = accessories.filter(
884
+ (acc) => acc && acc.displayName === config.homeName + ' ' + zone.name + ' Heater'
885
+ );
887
886
 
888
- if (heatAccessory.length) heatAccessory[0].context.config.zoneId = zoneWithID.id;
889
-
890
- config.zones[index].id = zoneWithID.id;
891
- config.zones[index].battery = !config.zones[index].noBattery
892
- ? zoneWithID.devices.filter(
893
- (device) =>
894
- device &&
895
- (zone.type === 'HEATING' || zone.type === 'AIR_CONDITIONING') &&
896
- typeof device.batteryState === 'string' &&
897
- !device.batteryState.includes('NORMAL')
898
- ).length
899
- ? zoneWithID.devices.filter((device) => device && !device.batteryState.includes('NORMAL'))[0]
900
- .batteryState
901
- : zoneWithID.devices.filter((device) => device && device.duties.includes('ZONE_LEADER'))[0].batteryState
902
- : false;
903
- config.zones[index].openWindowEnabled =
904
- zoneWithID.openWindowDetection && zoneWithID.openWindowDetection.enabled ? true : false;
905
- }
906
- });
907
- }
887
+ if (heatAccessory.length) heatAccessory[0].context.config.zoneId = zoneWithID.id;
888
+
889
+ config.zones[index].id = zoneWithID.id;
890
+ config.zones[index].battery = !config.zones[index].noBattery
891
+ ? zoneWithID.devices.filter(
892
+ (device) =>
893
+ device &&
894
+ (zone.type === 'HEATING' || zone.type === 'AIR_CONDITIONING') &&
895
+ typeof device.batteryState === 'string' &&
896
+ !device.batteryState.includes('NORMAL')
897
+ ).length
898
+ ? zoneWithID.devices.filter((device) => device && !device.batteryState.includes('NORMAL'))[0]
899
+ .batteryState
900
+ : zoneWithID.devices.filter((device) => device && device.duties.includes('ZONE_LEADER'))[0].batteryState
901
+ : false;
902
+ config.zones[index].openWindowEnabled =
903
+ zoneWithID.openWindowDetection && zoneWithID.openWindowDetection.enabled ? true : false;
904
+ }
905
+ });
908
906
  }
909
907
 
910
908
  let zonesToUpdate = [];