homebridge-melcloud-control 4.0.1-beta.4 → 4.0.1-beta.5
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/homebridge-ui/public/index.html +10 -10
- package/package.json +1 -1
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
const handleDevices = (devicesInMelCloud, devicesInConfig, typeString, newArr, newPresets) => {
|
|
259
259
|
devicesInMelCloud.forEach(device => {
|
|
260
260
|
const { DeviceID: id, Type: type, DeviceName: name, Presets: presets = [] } = device;
|
|
261
|
-
const
|
|
261
|
+
const deviceObj = {
|
|
262
262
|
id,
|
|
263
263
|
type,
|
|
264
264
|
typeString,
|
|
@@ -266,25 +266,25 @@
|
|
|
266
266
|
displayType: 0,
|
|
267
267
|
presets: [],
|
|
268
268
|
buttonsSensors: []
|
|
269
|
-
}
|
|
269
|
+
};
|
|
270
270
|
|
|
271
271
|
if (!devicesInConfig.some(device => String(device.id) === id)) {
|
|
272
|
-
devicesInConfig.push(
|
|
273
|
-
newArr.push(
|
|
272
|
+
devicesInConfig.push(deviceObj);
|
|
273
|
+
newArr.push(deviceObj);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
presets.forEach(preset => {
|
|
277
|
-
const
|
|
277
|
+
const presetObj = {
|
|
278
278
|
id: preset.ID,
|
|
279
279
|
name: preset.NumberDescription,
|
|
280
280
|
displayType: 0,
|
|
281
281
|
namePrefix: false
|
|
282
|
-
}
|
|
282
|
+
};
|
|
283
283
|
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
|
|
287
|
-
newPresets.push(
|
|
284
|
+
const deviceInConfig = devicesInConfig.find(device => String(device.id) === id);
|
|
285
|
+
if (deviceInConfig && !deviceInConfig.presets.some(preset => preset.id === p.id)) {
|
|
286
|
+
deviceInConfig.presets.push(presetObj);
|
|
287
|
+
newPresets.push(presetObj);
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
});
|
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.1-beta.
|
|
4
|
+
"version": "4.0.1-beta.5",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|