homebridge-tasmota-control 1.6.1-beta.14 → 1.6.1-beta.16
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 +23 -20
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -147,32 +147,35 @@ class Sensors extends EventEmitter {
|
|
|
147
147
|
if (this.sensorsCount > 0) {
|
|
148
148
|
for (let i = 0; i < this.sensorsCount; i++) {
|
|
149
149
|
const sensor = this.sensors[i];
|
|
150
|
-
this.sensorTemperatureServices?.[i]?.Characteristic
|
|
151
|
-
this.sensorReferenceTemperatureServices?.[i]?.Characteristic
|
|
152
|
-
this.sensorObjTemperatureServices?.[i]?.Characteristic
|
|
153
|
-
this.sensorAmbTemperatureServices?.[i]?.Characteristic
|
|
154
|
-
this.sensorDewPointTemperatureServices?.[i]?.Characteristic
|
|
155
|
-
this.sensorHumidityServices?.[i]?.Characteristic
|
|
150
|
+
this.sensorTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, sensor.temperature);
|
|
151
|
+
this.sensorReferenceTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, sensor.referenceTemperature);
|
|
152
|
+
this.sensorObjTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, sensor.objTemperature);
|
|
153
|
+
this.sensorAmbTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, sensor.ambTemperature);
|
|
154
|
+
this.sensorDewPointTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, sensor.dewPointTemperature);
|
|
155
|
+
this.sensorHumidityServices?.[i]?.Characteristic?.CurrentRelativeHumidity?.updateCharacteristic(Characteristic.CurrentRelativeHumidity, sensor.humidity);
|
|
156
156
|
|
|
157
157
|
const co2Service = this.sensorCarbonDioxydeServices?.[i];
|
|
158
|
-
co2Service?.Characteristic
|
|
159
|
-
co2Service?.Characteristic
|
|
160
|
-
co2Service?.Characteristic
|
|
158
|
+
co2Service?.Characteristic?.CarbonDioxideDetected?.updateCharacteristic(Characteristic.CarbonDioxideDetected, sensor.carbonDioxyde > 1000);
|
|
159
|
+
co2Service?.Characteristic?.CarbonDioxideLevel?.updateCharacteristic(Characteristic.CarbonDioxideLevel, sensor.carbonDioxyde);
|
|
160
|
+
co2Service?.Characteristic?.CarbonDioxidePeakLevel?.updateCharacteristic(Characteristic.CarbonDioxidePeakLevel, sensor.carbonDioxyde);
|
|
161
161
|
|
|
162
|
-
this.sensorAmbientLightServices?.[i]?.Characteristic
|
|
163
|
-
this.sensorMotionServices?.[i]?.Characteristic
|
|
162
|
+
this.sensorAmbientLightServices?.[i]?.Characteristic?.CurrentAmbientLightLevel?.updateCharacteristic(Characteristic.CurrentAmbientLightLevel, sensor.ambientLight);
|
|
163
|
+
this.sensorMotionServices?.[i]?.Characteristic?.MotionDetected?.updateCharacteristic(Characteristic.MotionDetected, sensor.motion);
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
//energy
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
167
|
+
this.sensorMotionServices?.[i]
|
|
168
|
+
?.Characteristic?.Power?.updateCharacteristic(Characteristic.MotionDetected, sensor.power)
|
|
169
|
+
.Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.MotionDetected, sensor.apparentPower)
|
|
170
|
+
.Characteristic?.ReactivePower?.updateCharacteristic(Characteristic.MotionDetected, sensor.reactivePower)
|
|
171
|
+
.Characteristic?.EnergyToday?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyToday)
|
|
172
|
+
.Characteristic?.EnergyLastDay?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyLastDay)
|
|
173
|
+
.Characteristic?.EnergyLifetime?.updateCharacteristic(Characteristic.MotionDetected, sensor.energyLifetime)
|
|
174
|
+
.Characteristic?.Current?.updateCharacteristic(Characteristic.MotionDetected, sensor.current)
|
|
175
|
+
.Characteristic?.Voltage?.updateCharacteristic(Characteristic.MotionDetected, sensor.voltage)
|
|
176
|
+
.Characteristic?.Factor?.updateCharacteristic(Characteristic.MotionDetected, sensor.factor)
|
|
177
|
+
.Characteristic?.Frequency?.updateCharacteristic(Characteristic.MotionDetected, sensor.frequency)
|
|
178
|
+
.Characteristic?.ReadingTime?.updateCharacteristic(Characteristic.MotionDetected, sensor.readingTime);
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
}
|