homebridge-melcloud-control 4.0.0-beta.203 → 4.0.0-beta.204
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/config.schema.json +3 -3
- package/homebridge-ui/public/index.html +6 -6
- package/index.js +1 -1
- package/package.json +1 -1
package/config.schema.json
CHANGED
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
}
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
|
-
"
|
|
204
|
+
"type": {
|
|
205
205
|
"title": "Account Type",
|
|
206
206
|
"type": "string",
|
|
207
207
|
"default": "disabled",
|
|
@@ -1825,7 +1825,7 @@
|
|
|
1825
1825
|
"user",
|
|
1826
1826
|
"passwd",
|
|
1827
1827
|
"language",
|
|
1828
|
-
"
|
|
1828
|
+
"type"
|
|
1829
1829
|
]
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
@@ -1844,7 +1844,7 @@
|
|
|
1844
1844
|
"type": "password"
|
|
1845
1845
|
},
|
|
1846
1846
|
"accounts[].language",
|
|
1847
|
-
"accounts[].
|
|
1847
|
+
"accounts[].type",
|
|
1848
1848
|
{
|
|
1849
1849
|
"key": "accounts[]",
|
|
1850
1850
|
"type": "tabarray",
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
document.getElementById('user').value = acc.user || '';
|
|
135
135
|
document.getElementById('passwd').value = acc.passwd || '';
|
|
136
136
|
document.getElementById('language').value = acc.language || '0';
|
|
137
|
-
document.getElementById('accountType').value = acc.
|
|
138
|
-
document.getElementById('logIn').disabled = !(acc.name && acc.user && acc.passwd && acc.language && acc.
|
|
137
|
+
document.getElementById('accountType').value = acc.type || 'disabled';
|
|
138
|
+
document.getElementById('logIn').disabled = !(acc.name && acc.user && acc.passwd && acc.language && acc.type);
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
if (i === accountsCount - 1 && accountsCount > 0)
|
|
@@ -154,9 +154,9 @@
|
|
|
154
154
|
acc.user = document.querySelector('#user').value;
|
|
155
155
|
acc.passwd = document.querySelector('#passwd').value;
|
|
156
156
|
acc.language = document.querySelector('#language').value;
|
|
157
|
-
acc.
|
|
157
|
+
acc.type = document.querySelector('#accountType').value;
|
|
158
158
|
|
|
159
|
-
document.getElementById('logIn').disabled = !(acc.name && acc.user && acc.passwd && acc.language && acc.
|
|
159
|
+
document.getElementById('logIn').disabled = !(acc.name && acc.user && acc.passwd && acc.language && acc.type);
|
|
160
160
|
|
|
161
161
|
await homebridge.updatePluginConfig(pluginConfig);
|
|
162
162
|
await homebridge.savePluginConfig(pluginConfig);
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
|
|
216
216
|
try {
|
|
217
217
|
const acc = pluginConfig[0].accounts[this.accountIndex];
|
|
218
|
-
const payload = { accountName: acc.name, user: acc.user, passwd: acc.passwd, language: acc.language, accountType: acc.
|
|
218
|
+
const payload = { accountName: acc.name, user: acc.user, passwd: acc.passwd, language: acc.language, accountType: acc.type };
|
|
219
219
|
const devicesInMelCloud = await homebridge.request('/connect', payload);
|
|
220
220
|
|
|
221
221
|
// Initialize devices arrays
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
const p = structuredClone({
|
|
259
259
|
id: preset.ID,
|
|
260
260
|
name: preset.NumberDescription,
|
|
261
|
-
|
|
261
|
+
displayType: 0,
|
|
262
262
|
namePrefix: false
|
|
263
263
|
});
|
|
264
264
|
|
package/index.js
CHANGED
|
@@ -30,7 +30,7 @@ class MelCloudPlatform {
|
|
|
30
30
|
api.on('didFinishLaunching', async () => {
|
|
31
31
|
//loop through accounts
|
|
32
32
|
for (const account of config.accounts) {
|
|
33
|
-
const accountType = account.
|
|
33
|
+
const accountType = account.type || 'disabled';
|
|
34
34
|
if (accountType === 'disabled') continue;
|
|
35
35
|
|
|
36
36
|
const accountName = account.name;
|
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.204",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|