@homebridge-plugins/homebridge-tado 8.4.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,11 @@
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
+
6
+ ## v8.5.0 - 2025-10-27
7
+ - Change minimum polling interval to 30s due to improvements made in v8.2.0
8
+
3
9
  ## v8.4.0 - 2025-10-26
4
10
  - Improve state handling to ensure Apple Home states always reflect current tado states
5
11
 
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "polling": {
45
45
  "title": "Polling",
46
- "description": "The polling interval in seconds.",
46
+ "description": "The polling interval in seconds (recommended value: 300).",
47
47
  "type": "integer",
48
48
  "default": 300,
49
49
  "minimum": 30
@@ -36,7 +36,7 @@ const schema = {
36
36
  },
37
37
  'polling': {
38
38
  'title': 'Polling',
39
- 'description': 'The polling interval in seconds.',
39
+ 'description': 'The polling interval in seconds (recommended value: 300).',
40
40
  'type': 'integer',
41
41
  'default': 300,
42
42
  'minimum': 30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge-plugins/homebridge-tado",
3
- "version": "8.4.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
+ }
@@ -773,7 +773,7 @@ export default (api, accessories, config, tado, telegram) => {
773
773
  tasksInitialized = true;
774
774
 
775
775
  void getStates();
776
- setInterval(() => getStates(), Math.max(config.polling, 300) * 1000);
776
+ setInterval(() => getStates(), Math.max(config.polling, 30) * 1000);
777
777
 
778
778
  void logCounter();
779
779
  setInterval(() => logCounter(), 60 * 60 * 1000);
@@ -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 = [];
@@ -519,7 +519,7 @@ export default {
519
519
  home.extras && home.extras.childLockSwitches
520
520
  ? home.extras.childLockSwitches.filter((childLockSwitch) => childLockSwitch && childLockSwitch.active)
521
521
  : [],
522
- polling: Number.isInteger(home.polling) ? (home.polling < 300 ? 300 : home.polling) : 300,
522
+ polling: Number.isInteger(home.polling) ? (home.polling < 30 ? 30 : home.polling) : 300,
523
523
  };
524
524
 
525
525
  if (home.zones && home.zones.length) {