homebridge-melcloud-control 3.7.6 → 3.7.7
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/impulsegenerator.js +5 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.7.
|
|
4
|
+
"version": "3.7.7",
|
|
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/impulsegenerator.js
CHANGED
|
@@ -12,6 +12,10 @@ class ImpulseGenerator extends EventEmitter {
|
|
|
12
12
|
return true;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
//update state
|
|
16
|
+
const updateState = timers.length > 0 ? this.state(true) : false;
|
|
17
|
+
|
|
18
|
+
//add timers
|
|
15
19
|
this.timers = [];
|
|
16
20
|
for (const timer of timers) {
|
|
17
21
|
this.emit(timer.name);
|
|
@@ -22,8 +26,6 @@ class ImpulseGenerator extends EventEmitter {
|
|
|
22
26
|
this.timers.push(newTimer);
|
|
23
27
|
};
|
|
24
28
|
|
|
25
|
-
//update state
|
|
26
|
-
this.state(true);
|
|
27
29
|
return true;
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -36,6 +38,7 @@ class ImpulseGenerator extends EventEmitter {
|
|
|
36
38
|
//update state
|
|
37
39
|
this.timers.forEach(timer => clearInterval(timer));
|
|
38
40
|
this.timers = [];
|
|
41
|
+
|
|
39
42
|
this.state(false);
|
|
40
43
|
return true
|
|
41
44
|
}
|