homebridge-tasmota-control 1.6.1-beta.13 → 1.6.1-beta.15
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 +12 -12
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -147,20 +147,20 @@ 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
|
|
@@ -425,7 +425,7 @@ class Sensors extends EventEmitter {
|
|
|
425
425
|
//energy
|
|
426
426
|
if (sensor.name === 'ENERGY') {
|
|
427
427
|
const debug4 = this.enableDebugMode ? this.emit('debug', `Prepare Power And Energy Service`) : false;
|
|
428
|
-
const serviceName = this.sensorsNamePrefix ? `${accessoryName} ${sensorName}` : `${sensorName}
|
|
428
|
+
const serviceName = this.sensorsNamePrefix ? `${accessoryName} ${sensorName}` : `${sensorName}`;
|
|
429
429
|
const energyService = accessory.addService(Service.PowerAndEnergyService, serviceName, `Energy Sensor ${i}`);
|
|
430
430
|
energyService.setCharacteristic(Characteristic.ConfiguredName, serviceName);
|
|
431
431
|
if (sensor.power) {
|