homebridge-tasmota-control 1.4.0-beta.7 → 1.4.0-beta.9
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/CHANGELOG.md +1 -1
- package/package.json +1 -1
- package/src/tasmotadevice.js +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## Changes
|
|
11
11
|
|
|
12
|
-
- added support for
|
|
12
|
+
- added support for iFan, solved [#24](https://github.com/grzegorz914/homebridge-tasmota-control/issues/24)
|
|
13
13
|
- config schema updated
|
|
14
14
|
- redme updated
|
|
15
15
|
- cleanup
|
package/package.json
CHANGED
package/src/tasmotadevice.js
CHANGED
|
@@ -154,8 +154,8 @@ class TasmotaDevice extends EventEmitter {
|
|
|
154
154
|
this.previousStateSwingH = 'center';
|
|
155
155
|
|
|
156
156
|
//fan
|
|
157
|
-
this.
|
|
158
|
-
this.fanSpeed =
|
|
157
|
+
this.fanDirection = 0;
|
|
158
|
+
this.fanSpeed = 0;
|
|
159
159
|
|
|
160
160
|
//axios instance
|
|
161
161
|
this.axiosInstance = axios.create({
|
|
@@ -1264,9 +1264,8 @@ class TasmotaDevice extends EventEmitter {
|
|
|
1264
1264
|
const power1 = powerStatusKeys.includes('POWER1');
|
|
1265
1265
|
const powerKey = relaysCount === 1 ? (power1 ? 'POWER1' : 'POWER') : `POWER${powerNr}`;
|
|
1266
1266
|
const power = powerStatus[powerKey] === 'ON';
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1269
|
-
const speed = statusSts.FanSpeed > 0 ? statusSts.FanSpeed : this.fanSpeed;
|
|
1267
|
+
const direction = statusSts.FanDirection ?? 0;
|
|
1268
|
+
const speed = statusSts.FanSpeed;
|
|
1270
1269
|
|
|
1271
1270
|
//push to array
|
|
1272
1271
|
const fan = {
|
|
@@ -1285,7 +1284,7 @@ class TasmotaDevice extends EventEmitter {
|
|
|
1285
1284
|
.updateCharacteristic(Characteristic.RotationSpeed, speed);
|
|
1286
1285
|
}
|
|
1287
1286
|
|
|
1288
|
-
this.
|
|
1287
|
+
this.fanDirection = direction;
|
|
1289
1288
|
this.fanSpeed = speed;
|
|
1290
1289
|
|
|
1291
1290
|
//log info
|
|
@@ -2262,7 +2261,7 @@ class TasmotaDevice extends EventEmitter {
|
|
|
2262
2261
|
// });
|
|
2263
2262
|
fanService.getCharacteristic(Characteristic.RotationSpeed)
|
|
2264
2263
|
.setProps({
|
|
2265
|
-
minValue:
|
|
2264
|
+
minValue: 0,
|
|
2266
2265
|
maxValue: 3,
|
|
2267
2266
|
minStep: 1
|
|
2268
2267
|
})
|