homebridge-melcloud-control 2.5.0-beta.22 → 2.5.0-beta.23
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.
- package/package.json +1 -1
- package/src/melcloud.js +10 -10
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "2.5.0-beta.
|
|
4
|
+
"version": "2.5.0-beta.23",
|
|
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
|
@@ -31,16 +31,16 @@ class MelCloud extends EventEmitter {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
this.impulseGenerator = new ImpulseGenerator();
|
|
35
|
-
this.impulseGenerator.on('checkDevicesList', async () => {
|
|
36
|
-
try {
|
|
37
|
-
await this.chackDevicesList(this.contextKey);
|
|
38
|
-
} catch (error) {
|
|
39
|
-
this.emit('error', `Check devices list: ${error}.`);
|
|
40
|
-
};
|
|
41
|
-
}).on('state', (state) => { });
|
|
42
|
-
|
|
43
34
|
if (!connectForConfig) {
|
|
35
|
+
this.impulseGenerator = new ImpulseGenerator();
|
|
36
|
+
this.impulseGenerator.on('checkDevicesList', async () => {
|
|
37
|
+
try {
|
|
38
|
+
await this.chackDevicesList(this.contextKey);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
this.emit('error', `Check devices list: ${error}.`);
|
|
41
|
+
};
|
|
42
|
+
}).on('state', (state) => { });
|
|
43
|
+
|
|
44
44
|
this.connect();
|
|
45
45
|
};
|
|
46
46
|
};
|
|
@@ -189,7 +189,7 @@ class MelCloud extends EventEmitter {
|
|
|
189
189
|
|
|
190
190
|
return true;
|
|
191
191
|
} catch (error) {
|
|
192
|
-
this.impulseGenerator.stop();
|
|
192
|
+
const stop = connectForConfig ? false : this.impulseGenerator.stop();
|
|
193
193
|
throw new Error(`Scanning for devices error: ${error.message ?? error}.`);
|
|
194
194
|
};
|
|
195
195
|
}
|