homebridge-tasmota-control 0.3.42 → 0.3.44
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 +9 -1
- package/index.js +1 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,17 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
## [0.3.43] - (28.12.2021)
|
|
7
|
+
## Changs
|
|
8
|
+
- code cleanup
|
|
9
|
+
|
|
10
|
+
## [0.3.42] - (26.12.2021)
|
|
11
|
+
## Changs
|
|
12
|
+
- code cleanup
|
|
13
|
+
|
|
6
14
|
## [0.3.41] - (25.12.2021)
|
|
7
15
|
## Changs
|
|
8
|
-
- catch error
|
|
16
|
+
- catch error if happened on set state
|
|
9
17
|
|
|
10
18
|
## [0.3.39] - (25.12.2021)
|
|
11
19
|
## Changs
|
package/index.js
CHANGED
|
@@ -154,11 +154,10 @@ class tasmotaDevice {
|
|
|
154
154
|
this.powerState = new Array();
|
|
155
155
|
for (let i = 0; i < this.channelsCount; i++) {
|
|
156
156
|
const channel = this.channelsCount == 1 ? 'POWER' : 'POWER' + (i + 1);
|
|
157
|
-
const powerState = (response.data[channel]
|
|
157
|
+
const powerState = (response.data[channel] == 'ON');
|
|
158
158
|
if (this.tasmotaServices) {
|
|
159
159
|
this.tasmotaServices[i]
|
|
160
160
|
.updateCharacteristic(Characteristic.On, powerState)
|
|
161
|
-
.updateCharacteristic(Characteristic.OutletInUse, powerState);
|
|
162
161
|
}
|
|
163
162
|
this.powerState.push(powerState);
|
|
164
163
|
}
|
|
@@ -222,12 +221,6 @@ class tasmotaDevice {
|
|
|
222
221
|
this.log.error('Device: %s %s, set state: %s', this.host, this.name, error);
|
|
223
222
|
}
|
|
224
223
|
});
|
|
225
|
-
tasmotaService.getCharacteristic(Characteristic.OutletInUse)
|
|
226
|
-
.onGet(async () => {
|
|
227
|
-
const state = this.powerState[i];
|
|
228
|
-
const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, in use: %s', this.host, accessoryName, state ? 'YES' : 'NO');
|
|
229
|
-
return state;
|
|
230
|
-
});
|
|
231
224
|
this.tasmotaServices.push(tasmotaService);
|
|
232
225
|
accessory.addService(this.tasmotaServices[i]);
|
|
233
226
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Tasmota Control",
|
|
3
3
|
"name": "homebridge-tasmota-control",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.44",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Tasmota flashed devices.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"LICENSE"
|
|
28
28
|
],
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
30
|
+
"node": ">=14.0.0",
|
|
31
31
|
"homebridge": ">=1.3.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|