homebridge-melcloud-control 4.2.3-beta.4 → 4.2.3-beta.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/melcloud.js +11 -9
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.2.3-beta.4",
4
+ "version": "4.2.3-beta.5",
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/melcloud.js CHANGED
@@ -142,19 +142,21 @@ class MelCloud extends EventEmitter {
142
142
 
143
143
  try {
144
144
  const accountInfo = { State: false, Info: '', LoginData: null, ContextKey: null, UseFahrenheit: false }
145
+
146
+ const payload = {
147
+ Email: this.user,
148
+ Password: this.passwd,
149
+ Language: this.language,
150
+ AppVersion: '1.34.12',
151
+ CaptchaChallenge: '',
152
+ CaptchaResponse: '',
153
+ Persist: true
154
+ };
145
155
  const accountData = await axios(ApiUrls.ClientLogin, {
146
156
  method: 'POST',
147
157
  baseURL: ApiUrls.BaseURL,
148
158
  timeout: 15000,
149
- data: {
150
- Email: this.user,
151
- Password: this.passwd,
152
- Language: this.language,
153
- AppVersion: '1.34.12',
154
- CaptchaChallenge: '',
155
- CaptchaResponse: '',
156
- Persist: true
157
- }
159
+ data: payload
158
160
  });
159
161
  const account = accountData.data;
160
162
  const loginData = account.LoginData ?? [];