homebridge-melcloud-control 4.0.0-beta.511 → 4.0.0-beta.513

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 +2 -3
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.511",
4
+ "version": "4.0.0-beta.513",
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
@@ -366,8 +366,7 @@ class MelCloud extends EventEmitter {
366
366
  try {
367
367
  loginBtn = await page.waitForFunction(() => {
368
368
  const btns = Array.from(document.querySelectorAll('button.btn--blue'));
369
- btns.find(b => ['Zaloguj', 'Sign In', 'Login'].includes(b.textContent.trim()));
370
- return btns;
369
+ return btns.find(b => ['Zaloguj', 'Sign In', 'Login'].includes(b.textContent.trim()));
371
370
  }, { timeout: GLOBAL_TIMEOUT / 6 });
372
371
  } catch {
373
372
  accountInfo.State = false;
@@ -375,7 +374,7 @@ class MelCloud extends EventEmitter {
375
374
  return accountInfo;
376
375
  }
377
376
 
378
- this.emit('warn', `Found login button`);
377
+ this.emit('warn', `Found login button ${loginBtn}`);
379
378
  await Promise.race([Promise.all([loginBtn.click(), page.waitForNavigation({ waitUntil: ['domcontentloaded', 'networkidle2'], timeout: GLOBAL_TIMEOUT / 4 })]), new Promise(r => setTimeout(r, GLOBAL_TIMEOUT / 3))]);
380
379
 
381
380
  this.emit('warn', `Looking for credentials form...`);