homebridge-melcloud-control 2.5.0-beta.85 → 2.5.0-beta.87
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/index.js +6 -12
- package/package.json +1 -1
package/config.schema.json
CHANGED
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
}
|
|
673
673
|
},
|
|
674
674
|
"condition": {
|
|
675
|
-
"functionBody": "
|
|
675
|
+
"functionBody": "const devices = model.accounts[arrayIndices]?.ataDevices || []; return devices.length > 0 && devices.every(device => device.id != null && device.id !== '');"
|
|
676
676
|
}
|
|
677
677
|
},
|
|
678
678
|
"atwDevices": {
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
}
|
|
1011
1011
|
},
|
|
1012
1012
|
"condition": {
|
|
1013
|
-
"functionBody": "
|
|
1013
|
+
"functionBody": "const devices = model.accounts[arrayIndices]?.atwDevices || []; return devices.length > 0 && devices.every(device => device.id != null && device.id !== '');"
|
|
1014
1014
|
}
|
|
1015
1015
|
},
|
|
1016
1016
|
"ervDevices": {
|
|
@@ -1258,7 +1258,7 @@
|
|
|
1258
1258
|
}
|
|
1259
1259
|
},
|
|
1260
1260
|
"condition": {
|
|
1261
|
-
"functionBody": "
|
|
1261
|
+
"functionBody": "const devices = model.accounts[arrayIndices]?.ervDevices || []; return devices.length > 0 && devices.every(device => device.id != null && device.id !== '');"
|
|
1262
1262
|
}
|
|
1263
1263
|
},
|
|
1264
1264
|
"refreshInterval": {
|
package/index.js
CHANGED
|
@@ -78,14 +78,12 @@ class MelCloudPlatform {
|
|
|
78
78
|
|
|
79
79
|
//Air Conditioner
|
|
80
80
|
for (const device of account.ataDevices) {
|
|
81
|
-
const id = device.id ?? false;
|
|
82
|
-
|
|
83
81
|
//check id exist
|
|
84
|
-
if (!id) {
|
|
82
|
+
if (!device.id || !device.type) {
|
|
85
83
|
continue;
|
|
86
84
|
};
|
|
87
85
|
|
|
88
|
-
const deviceId = id.toString();
|
|
86
|
+
const deviceId = device.id.toString();
|
|
89
87
|
const deviceType = device.type;
|
|
90
88
|
const deviceName = device.name;
|
|
91
89
|
const deviceTypeText = CONSTANTS.DeviceType[deviceType];
|
|
@@ -119,14 +117,12 @@ class MelCloudPlatform {
|
|
|
119
117
|
|
|
120
118
|
//Heat Pump
|
|
121
119
|
for (const device of account.atwDevices) {
|
|
122
|
-
const id = device.id ?? false;
|
|
123
|
-
|
|
124
120
|
//check id exist
|
|
125
|
-
if (!id) {
|
|
121
|
+
if (!device.id || !device.type) {
|
|
126
122
|
continue;
|
|
127
123
|
};
|
|
128
124
|
|
|
129
|
-
const deviceId = id.toString();
|
|
125
|
+
const deviceId = device.id.toString();
|
|
130
126
|
const deviceType = device.type;
|
|
131
127
|
const deviceName = device.name;
|
|
132
128
|
const deviceTypeText = CONSTANTS.DeviceType[deviceType];
|
|
@@ -160,14 +156,12 @@ class MelCloudPlatform {
|
|
|
160
156
|
|
|
161
157
|
//Energy Recovery Ventilation
|
|
162
158
|
for (const device of account.ervDevices) {
|
|
163
|
-
const id = device.id ?? false;
|
|
164
|
-
|
|
165
159
|
//check id exist
|
|
166
|
-
if (!id) {
|
|
160
|
+
if (!device.id || !device.type) {
|
|
167
161
|
continue;
|
|
168
162
|
};
|
|
169
163
|
|
|
170
|
-
const deviceId = id.toString();
|
|
164
|
+
const deviceId = device.id.toString();
|
|
171
165
|
const deviceType = device.type;
|
|
172
166
|
const deviceName = device.name;
|
|
173
167
|
const deviceTypeText = CONSTANTS.DeviceType[deviceType];
|
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.87",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|