homebridge-melcloud-control 3.1.3-beta.4 → 3.1.3-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.
@@ -213,11 +213,7 @@
213
213
  };
214
214
 
215
215
  //presets
216
- const presetsOnMelCloudId = new Set(devicePresetsOnMelcloud.map(preset => preset.ID));
217
- let presetsAtaInConfig = pluginConfig[0].accounts[this.deviceIndex].ataDevices[index].presets ?? [];
218
- presetsAtaInConfig = presetsAtaInConfig.filter(preset => presetsOnMelCloudId.has(preset.id));
219
-
220
- for (const preset of presetsAtaInConfig) {
216
+ for (const preset of devicePresetsOnMelcloud) {
221
217
  const presetId = preset.ID;
222
218
  const presetName = preset.NumberDescription;
223
219
 
@@ -229,7 +225,7 @@
229
225
  };
230
226
  textAtaPresets = `ATA Presets: ${newDevices.ataPresets.length}`
231
227
 
232
- deviceAta.ataPresets = newDevices.ataPresets;
228
+ deviceAta.presets = newDevices.ataPresets;
233
229
  newDevices.ata.push(deviceAta);
234
230
  };
235
231
  pluginConfig[0].accounts[this.deviceIndex].ataDevices = newDevices.ata;
@@ -268,11 +264,7 @@
268
264
  };
269
265
 
270
266
  //presets
271
- const presetsOnMelCloudId = new Set(devicePresetsOnMelcloud.map(preset => preset.ID));
272
- let presetsAtwInConfig = pluginConfig[0].accounts[this.deviceIndex].atwDevices[index].presets ?? [];
273
- presetsAtwInConfig = presetsAtwInConfig.filter(preset => presetsOnMelCloudId.has(preset.id));
274
-
275
- for (const preset of presetsAtwInConfig) {
267
+ for (const preset of devicePresetsOnMelcloud) {
276
268
  const presetId = preset.ID;
277
269
  const presetName = preset.NumberDescription;
278
270
 
@@ -284,7 +276,7 @@
284
276
  };
285
277
  textAtwPresets = `ATA Presets: ${newDevices.atwPresets.length}`
286
278
 
287
- deviceAtw.atwPresets = deviceAtw.atwPresets;
279
+ deviceAtw.presets = deviceAtw.atwPresets;
288
280
  newDevices.ata.push(deviceAtw);
289
281
  };
290
282
  pluginConfig[0].accounts[this.deviceIndex].atwDevices = newDevices.atw;
@@ -317,11 +309,7 @@
317
309
  };
318
310
 
319
311
  //presets
320
- const presetsOnMelCloudId = new Set(devicePresetsOnMelcloud.map(preset => preset.ID));
321
- let presetsErvInConfig = pluginConfig[0].accounts[this.deviceIndex].ervDevices[index].presets ?? [];
322
- presetsErvInConfig = presetsErvInConfig.filter(preset => presetsOnMelCloudId.has(preset.id));
323
-
324
- for (const preset of presetsErvInConfig) {
312
+ for (const preset of devicePresetsOnMelcloud) {
325
313
  const presetId = preset.ID;
326
314
  const presetName = preset.NumberDescription;
327
315
 
@@ -333,7 +321,7 @@
333
321
  };
334
322
  textErvPresets = `ATA Presets: ${newDevices.ErvPresets.length}`
335
323
 
336
- deviceErv.atwPresets = deviceErv.ervPresets;
324
+ deviceErv.presets = deviceErv.ervPresets;
337
325
  newDevices.erv.push(deviceErv);
338
326
  };
339
327
  pluginConfig[0].accounts[this.deviceIndex].ervDevices = newDevices.erv;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.1.3-beta.4",
4
+ "version": "3.1.3-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",