homebridge-melcloud-control 4.0.0-beta.57 → 4.0.0-beta.58
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/package.json +1 -1
- package/src/melcloud.js +3 -6
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.58",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/melcloud.js
CHANGED
|
@@ -204,7 +204,7 @@ class MelCloud extends EventEmitter {
|
|
|
204
204
|
);
|
|
205
205
|
|
|
206
206
|
const createDevice = (device, type) => {
|
|
207
|
-
const settingsArray = device.Settings ||
|
|
207
|
+
const settingsArray = device.Settings || [];
|
|
208
208
|
|
|
209
209
|
const settingsObject = Object.fromEntries(
|
|
210
210
|
settingsArray.map(({ name, value }) => {
|
|
@@ -242,11 +242,8 @@ class MelCloud extends EventEmitter {
|
|
|
242
242
|
];
|
|
243
243
|
});
|
|
244
244
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
245
|
await this.functions.saveData(this.devicesFile, devices);
|
|
249
|
-
if (this.logDebug) this.emit('debug', `${
|
|
246
|
+
if (this.logDebug) this.emit('debug', `${devices.length} devices saved`);
|
|
250
247
|
|
|
251
248
|
return devices;
|
|
252
249
|
} catch (error) {
|
|
@@ -338,7 +335,7 @@ class MelCloud extends EventEmitter {
|
|
|
338
335
|
return devices
|
|
339
336
|
case "melcloudhome":
|
|
340
337
|
devices = await this.checkMelcloudHomeDevicesList(contextKey);
|
|
341
|
-
return devices
|
|
338
|
+
return devices;
|
|
342
339
|
default:
|
|
343
340
|
return devices;
|
|
344
341
|
}
|