@homebridge-plugins/homebridge-tado 8.6.0-beta.1 → 8.6.0-beta.2

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
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## v8.6.0 - 2025-10-30
4
4
  - BREAKING CHANGE: If you use tadoApiUrl or skipAuth, you must now define them under each corresponding home in your configuration (#176)
5
- - Refactored configuration: moved tadoApiUrl and skipAuth into individual home configs to support multiple API URLs (#176)
5
+ - Refactor configuration: moved tadoApiUrl and skipAuth into individual home configs to support multiple API URLs (#176)
6
+ - Persist tado zone states after every zone states update
6
7
  - Improved zone update logic: when setting a state, all zones are now updated immediately if the next scheduled update is more than 10 seconds away
7
8
  - Fix: Corrected zone update handling that could previously cause unintended heating changes (#178)
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebridge-plugins/homebridge-tado",
3
- "version": "8.6.0-beta.1",
3
+ "version": "8.6.0-beta.2",
4
4
  "description": "Homebridge plugin for controlling tado° devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -729,7 +729,7 @@ export default (api, accessories, config, tado, telegram) => {
729
729
  }
730
730
  }
731
731
 
732
- async function persistStates(homeId, zoneStates) {
732
+ async function persistZoneStates(homeId, zoneStates) {
733
733
  try {
734
734
  if (zoneStates && Object.keys(zoneStates).length) {
735
735
  const homeData = {};
@@ -741,6 +741,9 @@ export default (api, accessories, config, tado, telegram) => {
741
741
  } catch (error) {
742
742
  Logger.error(`Error while updating the tado states file for home ${homeId}: ${error.message || error}`);
743
743
  }
744
+ }
745
+
746
+ async function persistStates() {
744
747
  try {
745
748
  const data = {};
746
749
  data.counterData = await tado.getCounterData();
@@ -781,7 +784,6 @@ export default (api, accessories, config, tado, telegram) => {
781
784
 
782
785
  async function getStates() {
783
786
  lastGetStates = Date.now();
784
- let zoneStates = {};
785
787
  try {
786
788
  //ME
787
789
  if (!config.homeId) await updateMe();
@@ -790,7 +792,7 @@ export default (api, accessories, config, tado, telegram) => {
790
792
  if (!config.temperatureUnit) await updateHome();
791
793
 
792
794
  //Zones
793
- if (config.zones.length) zoneStates = await updateZones();
795
+ if (config.zones.length) await updateZones();
794
796
 
795
797
  //MobileDevices
796
798
  if (config.presence.length) await updateMobileDevices();
@@ -809,7 +811,7 @@ export default (api, accessories, config, tado, telegram) => {
809
811
  } catch (err) {
810
812
  errorHandler(err);
811
813
  } finally {
812
- void persistStates(config.homeId, zoneStates);
814
+ void persistStates();
813
815
  }
814
816
  }
815
817
 
@@ -903,6 +905,7 @@ export default (api, accessories, config, tado, telegram) => {
903
905
  }
904
906
 
905
907
  const zoneStates = (await tado.getZoneStates(config.homeId))["zoneStates"] ?? {};
908
+ void persistZoneStates(config.homeId, zoneStates);
906
909
 
907
910
  for (const zone of config.zones) {
908
911
  const zoneState = zoneStates[zone.id.toString()];