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

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