homebridge-melcloud-control 2.5.0-beta.43 → 2.5.0-beta.45
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
CHANGED
|
@@ -284,7 +284,6 @@
|
|
|
284
284
|
"type": "integer",
|
|
285
285
|
"minimum": 0,
|
|
286
286
|
"maximum": 2,
|
|
287
|
-
"default": 0,
|
|
288
287
|
"oneOf": [
|
|
289
288
|
{
|
|
290
289
|
"title": "None/Disabled",
|
|
@@ -338,7 +337,6 @@
|
|
|
338
337
|
"type": "integer",
|
|
339
338
|
"minimum": 0,
|
|
340
339
|
"maximum": 2,
|
|
341
|
-
"default": 0,
|
|
342
340
|
"oneOf": [
|
|
343
341
|
{
|
|
344
342
|
"title": "None/Disabled",
|
|
@@ -156,13 +156,13 @@
|
|
|
156
156
|
const deviceType = deviceInfo.Type;
|
|
157
157
|
const deviceId = deviceInfo.DeviceID;
|
|
158
158
|
const deviceName = deviceInfo.DeviceName;
|
|
159
|
-
const ataDevices = pluginConfig[0].accounts[this.deviceIndex].ataDevices;
|
|
160
|
-
const atwDevices = pluginConfig[0].accounts[this.deviceIndex].atwDevices;
|
|
161
|
-
const ervDevices = pluginConfig[0].accounts[this.deviceIndex].ervDevices;
|
|
159
|
+
const ataDevices = pluginConfig[0].accounts[this.deviceIndex].ataDevices ?? [];
|
|
160
|
+
const atwDevices = pluginConfig[0].accounts[this.deviceIndex].atwDevices ?? [];
|
|
161
|
+
const ervDevices = pluginConfig[0].accounts[this.deviceIndex].ervDevices ?? [];
|
|
162
162
|
const ataDeviceIdExist = ataDevices.some(device => device.id === deviceId)
|
|
163
163
|
const atwDeviceIdExist = atwDevices.some(device => device.id === deviceId)
|
|
164
164
|
const ervDeviceIdExist = ervDevices.some(device => device.id === deviceId)
|
|
165
|
-
const pushNewDevice =
|
|
165
|
+
const pushNewDevice = ataDeviceIdExist || atwDeviceIdExist || ervDeviceIdExist ? false : newDevices.push(deviceId);
|
|
166
166
|
|
|
167
167
|
const device = { name: deviceName, id: deviceId, type: deviceType, displayMode: 0 };
|
|
168
168
|
const pushTypeAta = deviceType === 0 && !ataDeviceIdExist ? ataDevices.push(device) : false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "2.5.0-beta.
|
|
4
|
+
"version": "2.5.0-beta.45",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|