homebridge-tasmota-control 1.6.1-beta.15 → 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.
- package/package.json +1 -1
- package/src/sensors.js +13 -11
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -162,17 +162,19 @@ 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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
this.sensorEnergyServices?.[i]
|
|
167
|
+
?.Characteristic?.Power?.updateCharacteristic(Characteristic.MotionDetected, sensor.power)
|
|
168
|
+
.Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.MotionDetected, sensor.apparentPower)
|
|
169
|
+
.Characteristic?.ReactivePower?.updateCharacteristic(Characteristic.MotionDetected, sensor.reactivePower)
|
|
170
|
+
.Characteristic?.EnergyToday?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyToday)
|
|
171
|
+
.Characteristic?.EnergyLastDay?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyLastDay)
|
|
172
|
+
.Characteristic?.EnergyLifetime?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyLifetime)
|
|
173
|
+
.Characteristic?.Current?.updateCharacteristic(Characteristic.MotionDetected, sensor.current)
|
|
174
|
+
.Characteristic?.Voltage?.updateCharacteristic(Characteristic.MotionDetected, sensor.voltage)
|
|
175
|
+
.Characteristic?.Factor?.updateCharacteristic(Characteristic.MotionDetected, sensor.factor)
|
|
176
|
+
.Characteristic?.Frequency?.updateCharacteristic(Characteristic.MotionDetected, sensor.frequency)
|
|
177
|
+
.Characteristic?.ReadingTime?.updateCharacteristic(Characteristic.MotionDetected, sensor.readingTime);
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
180
|
}
|
|
@@ -263,7 +265,7 @@ class Sensors extends EventEmitter {
|
|
|
263
265
|
let i = 0;
|
|
264
266
|
for (const sensor of this.sensors) {
|
|
265
267
|
const sensorName = sensor.name;
|
|
266
|
-
if (sensor.temperature) {
|
|
268
|
+
if (sensor.temperature !== undefined) {
|
|
267
269
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare Temperature Sensor Services`) : false;
|
|
268
270
|
const serviceName = this.sensorsNamePrefix ? `${accessoryName} ${sensorName} Temperature` : `${sensorName} Temperature`;
|
|
269
271
|
const sensorTemperatureService = accessory.addService(Service.TemperatureSensor, serviceName, `Temperature Sensor ${i}`);
|