homebridge-melcloud-control 4.3.3-beta.26 → 4.3.3-beta.28

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.
@@ -429,7 +429,7 @@
429
429
  if (newPresetsCount)
430
430
  updateInfo('info1', `Found new presets: ${newDevices.ataPresets.length ? `ATA: ${newDevices.ataPresets.length},` : ''} ${newDevices.atwPresets.length ? `ATW: ${newDevices.atwPresets.length},` : ''} ${newDevices.ervPresets.length ? `ERV: ${newDevices.ervPresets.length}` : ''}.`, 'green');
431
431
  if (newScenesCount || newSchedulesCount)
432
- updateInfo('info1', `Found new schedules: ATA: ${newDevices.ataSchedules.length ? `ATA: ${newDevices.ataSchedules.length},` : ''} ${newDevices.ataSchedules.length ? `ATW: ${newDevices.ataSchedules.length},` : ''} ${newDevices.ervSchedules.length ? `ERV: ${newDevices.ervSchedules.length},` : ''} ${newDevices.scenes.length ? `Scenes: ${newDevices.scenes.length}` : ''}.`, 'green');
432
+ updateInfo('info1', `Found new ${newSchedulesCount ? `schedules:` : ''} ${newDevices.ataSchedules.length ? `ATA: ${newDevices.ataSchedules.length},` : ''} ${newDevices.atwSchedules.length ? `ATW: ${newDevices.atwSchedules.length},` : ''} ${newDevices.ervSchedules.length ? `ERV: ${newDevices.ervSchedules.length},` : ''} ${newScenesCount ? `scenes: ${newScenesCount}` : ''}.`, 'green');
433
433
  if (removedDevicesCount)
434
434
  updateInfo('info2', `Removed devices: ${removedAta.length ? `ATA: ${removedAta.length},` : ''} ${removedAtw.length ? `ATW: ${removedAtw.length},` : ''} ${removedErv.length ? `ERV: ${removedErv.length}` : ''}.`, 'orange');
435
435
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.3.3-beta.26",
4
+ "version": "4.3.3-beta.28",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -158,8 +158,8 @@ class MelCloudAta extends EventEmitter {
158
158
  if (this.accountType === 'melcloudhome' && !this.connecting && !this.socketConnected) {
159
159
  this.connecting = true;
160
160
 
161
- const url = `${ApiUrlsHome.WebSocketURL}${devicesData.WebSocketOptions.Hash}`;
162
161
  try {
162
+ const url = `${ApiUrlsHome.WebSocketURL}${devicesData.WebSocketOptions.Hash}`;
163
163
  const socket = new WebSocket(url, { headers: devicesData.WebSocketOptions.Headers })
164
164
  .on('error', (error) => {
165
165
  if (this.logError) this.emit('error', `Socket error: ${error}`);
@@ -208,12 +208,13 @@ class MelCloudAta extends EventEmitter {
208
208
  for (const [key, value] of Object.entries(settings)) {
209
209
  if (!this.functions.isValidValue(value)) continue;
210
210
 
211
+ //update holiday mode
211
212
  if (key === 'HolidayMode') {
212
213
  deviceData.HolidayMode.Enabled = value;
213
214
  continue;
214
215
  }
215
216
 
216
- //skip HolidayMode, update generic device fields
217
+ //update device settings
217
218
  if (key in deviceData.Device) {
218
219
  deviceData.Device[key] = value;
219
220
  }