homebridge-tasmota-control 1.4.1-beta.6 → 1.4.1-beta.8
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/switches.js +6 -1
package/package.json
CHANGED
package/src/switches.js
CHANGED
|
@@ -2,7 +2,7 @@ import { promises as fsPromises } from 'fs';
|
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import EventEmitter from 'events';
|
|
4
4
|
import ImpulseGenerator from './impulsegenerator.js';
|
|
5
|
-
import { ApiCommands } from './constants.js';
|
|
5
|
+
import { ApiCommands, SensorKeys } from './constants.js';
|
|
6
6
|
let Accessory, Characteristic, Service, Categories, AccessoryUUID;
|
|
7
7
|
|
|
8
8
|
class Switches extends EventEmitter {
|
|
@@ -65,6 +65,11 @@ class Switches extends EventEmitter {
|
|
|
65
65
|
const powerStatus = powerStatusData.data ?? {};
|
|
66
66
|
const debug = this.enableDebugMode ? this.emit('debug', `Power status: ${JSON.stringify(powerStatus, null, 2)}`) : false;
|
|
67
67
|
|
|
68
|
+
//sensor status
|
|
69
|
+
const sensorStatusData = await this.axiosInstance(ApiCommands.Status);
|
|
70
|
+
const sensorStatus = sensorStatusData.data ?? {};
|
|
71
|
+
const debug1 = this.enableDebugMode ? this.emit('debug', `Sensors status: ${JSON.stringify(sensorStatus, null, 2)}`) : false;
|
|
72
|
+
|
|
68
73
|
//sensor status keys
|
|
69
74
|
const sensorStatusKeys = Object.keys(sensorStatus);
|
|
70
75
|
|