homebridge-melcloud-control 4.0.0-beta.234 → 4.0.0-beta.235
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,21 +96,16 @@
|
|
|
96
96
|
|
|
97
97
|
<script>
|
|
98
98
|
(async () => {
|
|
99
|
-
const
|
|
99
|
+
const pluginConfig = await homebridge.getPluginConfig();
|
|
100
100
|
|
|
101
|
-
if (!
|
|
102
|
-
|
|
103
|
-
await homebridge.updatePluginConfig(
|
|
101
|
+
if (!pluginConfig.length) {
|
|
102
|
+
pluginConfig.push({});
|
|
103
|
+
await homebridge.updatePluginConfig(pluginConfig);
|
|
104
104
|
homebridge.showSchemaForm();
|
|
105
105
|
return;
|
|
106
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));
|
|
112
108
|
this.accountIndex = 0;
|
|
113
|
-
|
|
114
109
|
const accounts = pluginConfig[0].accounts || [];
|
|
115
110
|
const accountsCount = accounts.length;
|
|
116
111
|
|
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.
|
|
4
|
+
"version": "4.0.0-beta.235",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|