homebridge-melcloud-control 4.1.2-beta.54 → 4.1.2-beta.56

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.
@@ -150,7 +150,7 @@
150
150
 
151
151
  // Ustawiamy formularz
152
152
  formElements.accountName.innerText = account.name || '';
153
- formElements.info.innerText = '';
153
+ formElements.info.innerText = `${JSON.stringify(pluginConfig)}`;
154
154
  formElements.info1.innerText = '';
155
155
  formElements.info2.innerText = '';
156
156
  formElements.name.value = account.name || '';
@@ -178,8 +178,8 @@
178
178
 
179
179
  formElements.logIn.disabled = !(account.name && account.user && account.passwd && account.language && account.type);
180
180
 
181
- await homebridge.updatePluginConfig(pluginConfig[0]);
182
- await homebridge.savePluginConfig(pluginConfig[0]);
181
+ await homebridge.updatePluginConfig(pluginConfig);
182
+ await homebridge.savePluginConfig(pluginConfig);
183
183
  });
184
184
 
185
185
  document.getElementById('melCloudAccount').style.display = 'block';
@@ -341,15 +341,14 @@
341
341
 
342
342
  // Return filtered devicesInConfig to make sure upstream code uses it
343
343
  return devicesInConfig;
344
-
345
344
  } catch (error) {
346
345
  updateInfo('info', `Error while processing device: ${JSON.stringify(error)}`, 'red');
347
346
  }
348
347
  };
349
348
 
350
- handleDevices(devicesByType.ata, account.ataDevices, "Air Conditioner", newDevices.ata, newDevices.ataPresets);
351
- handleDevices(devicesByType.atw, account.atwDevices, "Heat Pump", newDevices.atw, newDevices.atwPresets);
352
- handleDevices(devicesByType.erv, account.ervDevices, "Energy Recovery Ventilation", newDevices.erv, newDevices.ervPresets);
349
+ account.ataDevices = handleDevices(devicesByType.ata, account.ataDevices, "Air Conditioner", newDevices.ata, newDevices.ataPresets);
350
+ account.atwDevices = handleDevices(devicesByType.atw, account.atwDevices, "Heat Pump", newDevices.atw, newDevices.atwPresets);
351
+ account.ervDevices = handleDevices(devicesByType.erv, account.ervDevices, "Energy Recovery Ventilation", newDevices.erv, newDevices.ervPresets);
353
352
 
354
353
  const newDevicesCount = newDevices.ata.length + newDevices.atw.length + newDevices.erv.length;
355
354
  const newPresetsCount = newDevices.ataPresets.length + newDevices.atwPresets.length + newDevices.ervPresets.length;
@@ -366,8 +365,8 @@
366
365
  updateInfo('info2', `Removed devices: ATA: ${removedAta.length}, ATW: ${removedAtw.length}, ERV: ${removedErv.length}.`, 'orange');
367
366
  }
368
367
 
369
- await homebridge.updatePluginConfig(pluginConfig[0]);
370
- await homebridge.savePluginConfig(pluginConfig[0]);
368
+ await homebridge.updatePluginConfig(pluginConfig);
369
+ await homebridge.savePluginConfig(pluginConfig);
371
370
  document.getElementById('logIn').className = "btn btn-secondary";
372
371
 
373
372
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.1.2-beta.54",
4
+ "version": "4.1.2-beta.56",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",