homebridge-tasmota-control 1.6.1 → 1.6.2-beta.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.6.1",
4
+ "version": "1.6.2-beta.1",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/mielhvac.js CHANGED
@@ -324,7 +324,7 @@ class MiElHvac extends EventEmitter {
324
324
  break;
325
325
  default:
326
326
  this.emit('warn', `Unknown operating mode: ${operationMode}`);
327
- return
327
+ return;
328
328
  }
329
329
 
330
330
  obj.currentOperationMode = !power ? 0 : obj.currentOperationMode;
package/src/sensors.js CHANGED
@@ -120,6 +120,7 @@ class Sensors extends EventEmitter {
120
120
  obj.tempUnit = '°C';
121
121
  }
122
122
 
123
+ this.emit('warn', `Sensors status: ${JSON.stringify(obj, null, 2)}`)
123
124
  //update characteristics
124
125
  this.sensorTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.temperature);
125
126
  this.sensorReferenceTemperatureServices?.[i]?.Characteristic?.CurrentTemperature?.updateCharacteristic(Characteristic.CurrentTemperature, obj.referenceTemperature);
@@ -152,6 +153,7 @@ class Sensors extends EventEmitter {
152
153
  }
153
154
 
154
155
  if (isEnergy) {
156
+ this.emit('warn', `Energy: ${JSON.stringify(energy, null, 2)}`)
155
157
  //update characteristics
156
158
  this.sensorEnergyServices?.[i]?.Characteristic?.Power?.updateCharacteristic(Characteristic.Power, energy.power);
157
159
  this.sensorEnergyServices?.[i]?.Characteristic?.ApparentPower?.updateCharacteristic(Characteristic.ApparentPower, energy.apparentPower);
@@ -168,6 +170,7 @@ class Sensors extends EventEmitter {
168
170
 
169
171
  const sensor = isEnergy ? { ...obj, ...energy } : obj;
170
172
  const debug1 = this.enableDebugMode ? this.emit('debug', `Sensor: ${JSON.stringify(sensor, null, 2)}`) : false;
173
+ this.emit('warn', `Sensor: ${JSON.stringify(sensor, null, 2)}`)
171
174
 
172
175
  //push to array
173
176
  this.sensors.push(sensor);