homebridge-tasmota-control 1.6.2-beta.5 → 1.6.2-beta.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/sensors.js +4 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.6.2-beta.5",
4
+ "version": "1.6.2-beta.6",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/sensors.js CHANGED
@@ -155,6 +155,7 @@ class Sensors extends EventEmitter {
155
155
  this.emit('warn', `Energy: ${JSON.stringify(obj, null, 2)}`)
156
156
  //update characteristics
157
157
  this.sensorEnergyServices?.[i]?.Characteristic?.Power?.updateCharacteristic(Characteristic.Power, obj.power);
158
+ this.emit('warn', `Energy: ${JSON.stringify(obj, null, 2)}`)
158
159
  this.sensorEnergyServices?.[i]?.Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.ApparentPower, obj.apparentPower);
159
160
  this.sensorEnergyServices?.[i]?.Characteristic?.ReactivePower?.updateCharacteristic(Characteristic.ReactivePower, obj.reactivePower);
160
161
  this.sensorEnergyServices?.[i]?.Characteristic?.EnergyToday?.updateCharacteristic(Characteristic.EnergyToday, obj.energyToday);
@@ -167,6 +168,9 @@ class Sensors extends EventEmitter {
167
168
  this.sensorEnergyServices?.[i]?.Characteristic?.ReadingTime?.updateCharacteristic(Characteristic.ReadingTime, obj.time);
168
169
  }
169
170
 
171
+ const emit = this.sensorEnergyServices?.[i]?.Characteristic?.Power ? this.emit('warn', `Power: ${JSON.stringify(obj, null, 2)}`) : false;
172
+
173
+
170
174
  const debug1 = this.enableDebugMode ? this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`) : false;
171
175
  this.emit('warn', `Sensor: ${JSON.stringify(obj, null, 2)}`)
172
176
  i++;