homebridge-melcloud-control 3.9.0-beta.0 → 3.9.0-beta.2

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.
@@ -246,51 +246,15 @@
246
246
  });
247
247
  }
248
248
 
249
- const ataTemplate = {
250
- displayMode: 1,
251
- heatDryFanMode: 1,
252
- coolDryFanMode: 1,
253
- autoDryFanMode: 1,
254
- temperatureSensor: false,
255
- temperatureSensorOutdoor: false,
256
- };
257
-
258
- const atwTemplate = {
259
- displayMode: 1,
260
- hideZone: 0,
261
- temperatureSensor: false,
262
- temperatureSensorFlow: false,
263
- temperatureSensorReturn: false,
264
- temperatureSensorFlowZone1: false,
265
- temperatureSensorReturnZone1: false,
266
- temperatureSensorFlowWaterTank: false,
267
- temperatureSensorReturnWaterTank: false,
268
- temperatureSensorFlowZone2: false,
269
- temperatureSensorReturnZone2: false,
270
- temperatureSensorOutdoor: false,
271
- };
272
-
273
- const ervTemplate = {
274
- displayMode: 1,
275
- temperatureSensor: false,
276
- temperatureSensorOutdoor: false,
277
- temperatureSensorSupply: false,
278
- };
249
+ const ataTemplate = { displayMode: 1, heatDryFanMode: 1, coolDryFanMode: 1, autoDryFanMode: 1, temperatureSensor: false, temperatureSensorOutdoor: false };
250
+ const atwTemplate = { displayMode: 1, hideZone: 0, temperatureSensor: false, temperatureSensorFlow: false, temperatureSensorReturn: false, temperatureSensorFlowZone1: false, temperatureSensorReturnZone1: false, temperatureSensorFlowWaterTank: false, temperatureSensorReturnWaterTank: false, temperatureSensorFlowZone2: false, temperatureSensorReturnZone2: false, temperatureSensorOutdoor: false };
251
+ const ervTemplate = { displayMode: 1, temperatureSensor: false, temperatureSensorOutdoor: false, temperatureSensorSupply: false };
279
252
 
280
253
  handleDevices(devicesByTypeInMelCloud.ata, ataDevicesInConfig, newDevices.ata, newDevices.ataPresets, removedDevices.ata, "Air Conditioner", ataTemplate);
281
254
  handleDevices(devicesByTypeInMelCloud.atw, atwDevicesInConfig, newDevices.atw, newDevices.atwPresets, removedDevices.atw, "Heat Pump", atwTemplate);
282
255
  handleDevices(devicesByTypeInMelCloud.erv, ervDevicesInConfig, newDevices.erv, newDevices.ervPresets, removedDevices.erv, "Energy Recovery Ventilation", ervTemplate);
283
256
 
284
- const textAta = `ATA: ${newDevices.ata.length}`;
285
- const textAtw = `ATW: ${newDevices.atw.length}`;
286
- const textErv = `ERV: ${newDevices.erv.length}`;
287
- const textRemovedAta = `ATA: ${removedDevices.ata.length}`;
288
- const textRemovedAtw = `ATW: ${removedDevices.atw.length}`;
289
- const textRemovedErv = `ERV: ${removedDevices.erv.length}`;
290
- const textAtaPresets = `ATA Presets: ${newDevices.ataPresets.length}`;
291
- const textAtwPresets = `ATW Presets: ${newDevices.atwPresets.length}`;
292
- const textErvPresets = `ERV Presets: ${newDevices.ervPresets.length}`;
293
-
257
+ const formatDeviceNames = (arr) => arr.map(d => d.name).join(', ') || 'None';
294
258
  const newDevicesCount = newDevices.ata.length + newDevices.atw.length + newDevices.erv.length;
295
259
  const newPresetsCount = newDevices.ataPresets.length + newDevices.atwPresets.length + newDevices.ervPresets.length;
296
260
  const removedDevicesCount = removedDevices.ata.length + removedDevices.atw.length + removedDevices.erv.length;
@@ -299,18 +263,14 @@
299
263
  updateInfo('info', 'No changes (already synced).', 'white');
300
264
  } else {
301
265
  if (newDevicesCount > 0) {
302
- updateInfo('info', `Found, ${textAta}, ${textAtw}, ${textErv}.`, 'green');
266
+ updateInfo('info', `New Devices Found: ATA: ${formatDeviceNames(newDevices.ata)}, ATW: ${formatDeviceNames(newDevices.atw)}, ERV: ${formatDeviceNames(newDevices.erv)}`, 'green');
303
267
  updateInfo('info2', 'Now You can configure it.', 'green');
304
268
  }
305
269
  if (newPresetsCount > 0) {
306
- updateInfo('info1', `${textAtaPresets}, ${textAtwPresets}, ${textErvPresets}.`, 'green');
307
- if (newDevicesCount === 0) {
308
- updateInfo('info', `Found, ${textAtaPresets}, ${textAtwPresets}, ${textErvPresets}.`, 'green');
309
- updateInfo('info1', 'Now You can configure it.', 'green');
310
- }
270
+ updateInfo('info1', `New Presets: ATA: ${newDevices.ataPresets.length}, ATW: ${newDevices.atwPresets.length}, ERV: ${newDevices.ervPresets.length}`, 'green');
311
271
  }
312
272
  if (removedDevicesCount > 0) {
313
- updateInfo('info', `Removed, ${textRemovedAta}, ${textRemovedAtw}, ${textRemovedErv}.`, 'orange');
273
+ updateInfo('info', `Removed Devices: ATA: ${formatDeviceNames(removedDevices.ata)}, ATW: ${formatDeviceNames(removedDevices.atw)}, ERV: ${formatDeviceNames(removedDevices.erv)}`, 'orange');
314
274
  }
315
275
  }
316
276
 
@@ -327,4 +287,8 @@
327
287
  }
328
288
  });
329
289
  })();
330
- </script>
290
+ </script>
291
+
292
+ </body>
293
+
294
+ </html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.9.0-beta.0",
4
+ "version": "3.9.0-beta.2",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",