homebridge-melcloud-control 4.0.0-beta.95 → 4.0.0-beta.97

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.
@@ -157,6 +157,9 @@
157
157
  acc.displayType = document.querySelector('#displayType').value;
158
158
 
159
159
  document.getElementById('logIn').disabled = !(acc.name && acc.user && acc.passwd && acc.language && acc.displayType);
160
+
161
+ await homebridge.updatePluginConfig(pluginConfig);
162
+ await homebridge.savePluginConfig(pluginConfig);
160
163
  });
161
164
 
162
165
  // --- Config Button Toggle ---
@@ -205,9 +208,10 @@
205
208
  }
206
209
 
207
210
  document.getElementById('logIn').addEventListener('click', async () => {
208
- homebridge.showSpinner();
209
211
  document.getElementById(`logIn`).className = "btn btn-primary";
212
+
210
213
  updateInfo('info', 'Connecting...', 'yellow');
214
+ homebridge.showSpinner();
211
215
 
212
216
  try {
213
217
  const acc = pluginConfig[0].accounts[this.accountIndex];
package/index.js CHANGED
@@ -132,13 +132,13 @@ class MelCloudPlatform {
132
132
 
133
133
  for (const device of devices) {
134
134
  //chack device from config exist on melcloud
135
- device.id = displayType === 'melcloud' ? parseInt(device.id) : device.id;
136
135
  const displayMode = device.displayMode > 0;
137
136
  const deviceExistInMelCloud = devicesInMelcloud.some(dev => dev.DeviceID === device.id);
138
137
  if (!deviceExistInMelCloud || !displayMode) {
139
138
  continue;
140
139
  }
141
140
 
141
+ device.id = displayType === 'melcloud' ? parseInt(device.id) : device.id;
142
142
  const deviceName = device.name;
143
143
  const deviceType = device.type;
144
144
  const deviceTypeText = device.typeString;
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.0-beta.95",
4
+ "version": "4.0.0-beta.97",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceata.js CHANGED
@@ -956,7 +956,7 @@ class DeviceAta extends EventEmitter {
956
956
  const airDirectionFunction = this.accountMelcloud ? deviceData.Device.AirDirectionFunction : deviceData.Device.HasAirDirectionFunction;;
957
957
  const swingFunction = this.accountMelcloud ? deviceData.Device.SwingFunction : deviceData.Device.HasSwing;
958
958
  const hasOutdoorTemperature = deviceData.Device.HasOutdoorTemperature ?? false;
959
- const modelSupportsFanSpeed = deviceData.Device.ModelSupportsFanSpeed || deviceData.Device.NumberOfFanSpeeds > 0;
959
+ const modelSupportsFanSpeed = this.accountMelcloud ? deviceData.Device.ModelSupportsFanSpeed : deviceData.Device.NumberOfFanSpeeds > 0;
960
960
  const numberOfFanSpeeds = modelSupportsFanSpeed ? deviceData.Device.NumberOfFanSpeeds : 0;
961
961
  const modelSupportsAuto1 = this.accountMelcloud ? deviceData.Device.ModelSupportsAuto : deviceData.Device.HasAutoOperationMode;
962
962
  const modelSupportsAuto = this.autoDryFanMode >= 1 && modelSupportsAuto1