homebridge-tasmota-control 0.3.39 → 0.3.41-beta.0
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/index.js +7 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@ 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.38] - (
|
|
6
|
+
## [0.3.38] - (25.12.2021)
|
|
7
7
|
## Changs
|
|
8
8
|
- update config.schema
|
|
9
9
|
|
package/index.js
CHANGED
|
@@ -210,13 +210,17 @@ class tasmotaDevice {
|
|
|
210
210
|
const powerOn = this.channelsCount == 1 ? POWER + ON : POWER + (i + 1) + ON;
|
|
211
211
|
const powerOff = this.channelsCount == 1 ? POWER + OFF : POWER + (i + 1) + OFF;
|
|
212
212
|
state = state ? powerOn : powerOff;
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
try {
|
|
214
|
+
await this.axiosInstance(state);
|
|
215
|
+
const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, set state: %s', this.host, accessoryName, state ? 'ON' : 'OFF');
|
|
216
|
+
} catch (error) {
|
|
217
|
+
this.log.error('Device: %s %s, set state: %s', this.host, this.name, error);
|
|
218
|
+
}
|
|
215
219
|
});
|
|
216
220
|
tasmotaService.getCharacteristic(Characteristic.OutletInUse)
|
|
217
221
|
.onGet(async () => {
|
|
218
222
|
const state = this.powerState[i];
|
|
219
|
-
const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, in use: %s', this.host, accessoryName, state ? 'YES' : 'NO');
|
|
223
|
+
const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, in use state: %s', this.host, accessoryName, state ? 'YES' : 'NO');
|
|
220
224
|
return state;
|
|
221
225
|
});
|
|
222
226
|
this.tasmotaServices.push(tasmotaService);
|
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.41-beta.0",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Tasmota flashed devices.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|