homebridge-melcloud-control 4.0.0-beta.84 → 4.0.0-beta.86

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.
@@ -200,6 +200,16 @@
200
200
  document.getElementById(`logIn`).className = "btn btn-primary";
201
201
  updateInfo('info', 'Connecting...', 'yellow');
202
202
 
203
+ // Ensure each account has independent device arrays (avoid shared references)
204
+ if (Array.isArray(pluginConfig?.[0]?.accounts)) {
205
+ pluginConfig[0].accounts = pluginConfig[0].accounts.map(acc => ({
206
+ ...acc,
207
+ ataDevices: Array.isArray(acc.ataDevices) ? structuredClone(acc.ataDevices) : [],
208
+ atwDevices: Array.isArray(acc.atwDevices) ? structuredClone(acc.atwDevices) : [],
209
+ ervDevices: Array.isArray(acc.ervDevices) ? structuredClone(acc.ervDevices) : []
210
+ }));
211
+ }
212
+
203
213
  try {
204
214
  const acc = pluginConfig[0].accounts[this.accountIndex];
205
215
  const payload = { accountName: acc.name, user: acc.user, passwd: acc.passwd, language: acc.language, displayType: acc.displayType };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.0.0-beta.84",
4
+ "version": "4.0.0-beta.86",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",