homebridge-melcloud-control 4.1.2-beta.65 → 4.1.2-beta.66

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.
@@ -367,12 +367,11 @@
367
367
 
368
368
  await homebridge.updatePluginConfig(pluginConfig);
369
369
  await homebridge.savePluginConfig(pluginConfig);
370
- document.getElementById('logIn').className = "btn btn-secondary";
371
-
372
370
  } catch (error) {
373
371
  updateInfo('info', `Connect error ${JSON.stringify(error)}`, 'red');
374
372
  document.getElementById('logIn').className = "btn btn-secondary";
375
373
  } finally {
374
+ document.getElementById('logIn').className = "btn btn-secondary";
376
375
  homebridge.hideSpinner();
377
376
  }
378
377
  });
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.65",
4
+ "version": "4.1.2-beta.66",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -23,7 +23,6 @@ class MelCloudAtw extends EventEmitter {
23
23
 
24
24
  //set default values
25
25
  this.devicesData = {};
26
- this.headers = {};
27
26
 
28
27
  //lock flags
29
28
  this.locks = {
@@ -60,7 +59,6 @@ class MelCloudAtw extends EventEmitter {
60
59
  return null;
61
60
  }
62
61
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
63
- this.headers = deviceData.Headers;
64
62
 
65
63
  if (this.accountType === 'melcloudhome') {
66
64
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
@@ -155,7 +153,7 @@ class MelCloudAtw extends EventEmitter {
155
153
  method: 'POST',
156
154
  baseURL: ApiUrls.BaseURL,
157
155
  timeout: 10000,
158
- headers: this.headers,
156
+ headers: deviceData.Headers,
159
157
  withCredentials: true
160
158
  });
161
159
 
@@ -193,7 +191,7 @@ class MelCloudAtw extends EventEmitter {
193
191
  method: 'PUT',
194
192
  baseURL: ApiUrlsHome.BaseURL,
195
193
  timeout: 10000,
196
- headers: this.headers,
194
+ headers: deviceData.Headers,
197
195
  withCredentials: true
198
196
  });
199
197
 
@@ -23,7 +23,6 @@ class MelCloudErv extends EventEmitter {
23
23
 
24
24
  //set default values
25
25
  this.devicesData = {};
26
- this.headers = {};
27
26
 
28
27
  //lock flags
29
28
  this.locks = {
@@ -60,7 +59,6 @@ class MelCloudErv extends EventEmitter {
60
59
  return null;
61
60
  }
62
61
  const deviceData = devicesData.find(device => device.DeviceID === this.deviceId);
63
- this.headers = deviceData.Headers;
64
62
 
65
63
  if (this.accountType === 'melcloudhome') {
66
64
  deviceData.SerialNumber = deviceData.DeviceID || '4.0.0';
@@ -144,7 +142,7 @@ class MelCloudErv extends EventEmitter {
144
142
  method: 'POST',
145
143
  baseURL: ApiUrls.BaseURL,
146
144
  timeout: 10000,
147
- headers: this.headers,
145
+ headers: deviceData.Headers,
148
146
  withCredentials: true
149
147
  });
150
148
 
@@ -197,7 +195,7 @@ class MelCloudErv extends EventEmitter {
197
195
  method: 'PUT',
198
196
  baseURL: ApiUrlsHome.BaseURL,
199
197
  timeout: 10000,
200
- headers: this.headers,
198
+ headers: deviceData.Headers,
201
199
  withCredentials: true
202
200
  });
203
201