homebridge-tasmota-control 1.6.1-beta.16 → 1.6.1-beta.17

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 +2 -3
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.1-beta.16",
4
+ "version": "1.6.1-beta.17",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/sensors.js CHANGED
@@ -162,9 +162,8 @@ class Sensors extends EventEmitter {
162
162
  this.sensorAmbientLightServices?.[i]?.Characteristic?.CurrentAmbientLightLevel?.updateCharacteristic(Characteristic.CurrentAmbientLightLevel, sensor.ambientLight);
163
163
  this.sensorMotionServices?.[i]?.Characteristic?.MotionDetected?.updateCharacteristic(Characteristic.MotionDetected, sensor.motion);
164
164
 
165
-
166
165
  //energy
167
- this.sensorMotionServices?.[i]
166
+ this.sensorEnergyServices?.[i]
168
167
  ?.Characteristic?.Power?.updateCharacteristic(Characteristic.MotionDetected, sensor.power)
169
168
  .Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.MotionDetected, sensor.apparentPower)
170
169
  .Characteristic?.ReactivePower?.updateCharacteristic(Characteristic.MotionDetected, sensor.reactivePower)
@@ -266,7 +265,7 @@ class Sensors extends EventEmitter {
266
265
  let i = 0;
267
266
  for (const sensor of this.sensors) {
268
267
  const sensorName = sensor.name;
269
- if (sensor.temperature) {
268
+ if (sensor.temperature !== undefined) {
270
269
  const debug = this.enableDebugMode ? this.emit('debug', `Prepare Temperature Sensor Services`) : false;
271
270
  const serviceName = this.sensorsNamePrefix ? `${accessoryName} ${sensorName} Temperature` : `${sensorName} Temperature`;
272
271
  const sensorTemperatureService = accessory.addService(Service.TemperatureSensor, serviceName, `Temperature Sensor ${i}`);