homebridge-melcloud-control 4.0.0-beta.87 → 4.0.0-beta.89

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.
@@ -96,16 +96,19 @@
96
96
 
97
97
  <script>
98
98
  (async () => {
99
- const pluginConfig = await homebridge.getPluginConfig();
99
+ const config = await homebridge.getPluginConfig();
100
100
 
101
- // Ensure proper structure on load
102
- if (!pluginConfig.length) {
103
- pluginConfig.push({ accounts: [] });
104
- await homebridge.updatePluginConfig(pluginConfig);
101
+ if (!config.length) {
102
+ config.push({ accounts: [] });
103
+ await homebridge.updatePluginConfig(config);
105
104
  homebridge.showSchemaForm();
106
105
  return;
107
106
  }
108
- pluginConfig[0].accounts ??= [];
107
+
108
+ config[0].accounts ??= [];
109
+
110
+ // 🧩 Deep clone — UI-safe copy (JSON method resets references)
111
+ const pluginConfig = JSON.parse(JSON.stringify(config));
109
112
 
110
113
  this.accountIndex = 0;
111
114
  const accountsCount = pluginConfig[0].accounts.length;
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.87",
4
+ "version": "4.0.0-beta.89",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",