homebridge-melcloud-control 4.0.0-beta.14 → 4.0.0-beta.15

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 +1 -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.14",
4
+ "version": "4.0.0-beta.15",
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
@@ -266,7 +266,7 @@ class MelCloud extends EventEmitter {
266
266
  let c1 = null, c2 = null;
267
267
  page.on('response', async response => {
268
268
  const url = response.url();
269
- if (url.includes('GetDevices') || url.includes('Dashboard')) {
269
+ if (url.includes('Dashboard')) {
270
270
  const cookies = await page.cookies();
271
271
  c1 = cookies.find(c => c.name === '__Secure-monitorandcontrolC1')?.value || c1;
272
272
  c2 = cookies.find(c => c.name === '__Secure-monitorandcontrolC2')?.value || c2;
@@ -279,8 +279,6 @@ class MelCloud extends EventEmitter {
279
279
  await new Promise(resolve => setTimeout(resolve, 500));
280
280
  }
281
281
 
282
- if (!c1 || !c2) throw new Error('Cookies C1/C2 not found after login');
283
-
284
282
  const data = { C1: c1, C2: c2, date: new Date().toISOString() };
285
283
  await this.functions.saveData(this.cookiesFile, data);
286
284