homebridge-tasmota-control 1.6.2-beta.5 → 1.6.2-beta.7
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 +4 -2
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -141,7 +141,7 @@ class Sensors extends EventEmitter {
|
|
|
141
141
|
this.sensorReferenceTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.referenceTemperature);
|
|
142
142
|
this.sensorObjTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.objTemperature);
|
|
143
143
|
this.sensorAmbTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.ambTemperature);
|
|
144
|
-
this.sensorDewPointTemperatureServices?.[i].Characteristic
|
|
144
|
+
this.sensorDewPointTemperatureServices?.[i].Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.dewPointTemperature);
|
|
145
145
|
this.sensorHumidityServices?.[i]?.Characteristic?.CurrentRelativeHumidity?.updateCharacteristic(Characteristic.CurrentRelativeHumidity, obj.humidity);
|
|
146
146
|
this.sensorCarbonDioxydeServices?.[i]?.Characteristic?.CarbonDioxideDetected?.updateCharacteristic(Characteristic.CarbonDioxideDetected, obj.carbonDioxyde > 1000);
|
|
147
147
|
this.sensorCarbonDioxydeServices?.[i]?.Characteristic?.CarbonDioxideLevel?.updateCharacteristic(Characteristic.CarbonDioxideLevel, obj.carbonDioxyde);
|
|
@@ -152,7 +152,6 @@ class Sensors extends EventEmitter {
|
|
|
152
152
|
//energy
|
|
153
153
|
const isEnergy = key === 'ENERGY';
|
|
154
154
|
if (isEnergy) {
|
|
155
|
-
this.emit('warn', `Energy: ${JSON.stringify(obj, null, 2)}`)
|
|
156
155
|
//update characteristics
|
|
157
156
|
this.sensorEnergyServices?.[i]?.Characteristic?.Power?.updateCharacteristic(Characteristic.Power, obj.power);
|
|
158
157
|
this.sensorEnergyServices?.[i]?.Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.ApparentPower, obj.apparentPower);
|
|
@@ -167,6 +166,9 @@ class Sensors extends EventEmitter {
|
|
|
167
166
|
this.sensorEnergyServices?.[i]?.Characteristic?.ReadingTime?.updateCharacteristic(Characteristic.ReadingTime, obj.time);
|
|
168
167
|
}
|
|
169
168
|
|
|
169
|
+
const emit = this.sensorEnergyServices?.[i]?.Characteristic?.Power ? this.emit('warn', `Power: ${JSON.stringify(obj, null, 2)}`) : false;
|
|
170
|
+
|
|
171
|
+
|
|
170
172
|
const debug1 = this.enableDebugMode ? this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`) : false;
|
|
171
173
|
this.emit('warn', `Sensor: ${JSON.stringify(obj, null, 2)}`)
|
|
172
174
|
i++;
|