homebridge-tasmota-control 1.6.15-beta.20 → 1.6.15-beta.22
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/constants.js +3 -3
- package/src/mielhvac.js +10 -3
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -87,13 +87,13 @@ export const MiElHVAC = {
|
|
|
87
87
|
"purify": "HVACSetPurify%20on"
|
|
88
88
|
},
|
|
89
89
|
"SetEconoCool": {
|
|
90
|
-
"econocool": "
|
|
90
|
+
"econocool": "HVACSetEconoCool%20on"
|
|
91
91
|
},
|
|
92
92
|
"SetPowerFull": {
|
|
93
|
-
"powerfull": "
|
|
93
|
+
"powerfull": "HVACSetPowerFull%20on"
|
|
94
94
|
},
|
|
95
95
|
"SetNightMode": {
|
|
96
|
-
"nightmode": "
|
|
96
|
+
"nightmode": "HVACSetNightMode%20on"
|
|
97
97
|
},
|
|
98
98
|
"RemoteTemp": "HVACRemoteTemp%20",
|
|
99
99
|
"RemoteTempClearTime": "HVACRemoteTempClearTime%20",
|
package/src/mielhvac.js
CHANGED
|
@@ -524,7 +524,14 @@ class MiElHvac extends EventEmitter {
|
|
|
524
524
|
53: 'temp',
|
|
525
525
|
};
|
|
526
526
|
|
|
527
|
-
const
|
|
527
|
+
const functionsMap = {
|
|
528
|
+
60: 'purify', //purify
|
|
529
|
+
61: 'econoCool', //econocool
|
|
530
|
+
62: 'powerFull', //powerfull
|
|
531
|
+
63: 'noghtMode', //nightmode
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
const functionsStateMap = {
|
|
528
535
|
60: 'on', //purify
|
|
529
536
|
61: 'on', //econocool
|
|
530
537
|
62: 'on', //powerfull
|
|
@@ -547,8 +554,8 @@ class MiElHvac extends EventEmitter {
|
|
|
547
554
|
state = power && airDirection === airDirMap[mode];
|
|
548
555
|
} else if (prohibitMap[mode]) {
|
|
549
556
|
state = power && prohibit === prohibitMap[mode];
|
|
550
|
-
} else if (
|
|
551
|
-
state = power &&
|
|
557
|
+
} else if (functionsStateMap[mode]) {
|
|
558
|
+
state = power && functionsMap[mode] === functionsStateMap[mode];
|
|
552
559
|
} else {
|
|
553
560
|
this.emit('warn', `Unknown button mode: ${mode} detected`);
|
|
554
561
|
}
|