homebridge-tasmota-control 1.5.1-beta.3 → 1.5.1-beta.5

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/index.js CHANGED
@@ -70,9 +70,9 @@ class tasmotaPlatform {
70
70
  deviceInfo.on('debug', (debug) => {
71
71
  const emitLog = !enableDebugMode ? false : log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
72
72
  })
73
- .on('debug', (debug) => {
74
- const emitLog = enableDebugMode ? false : log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
75
- })
73
+ .on('debug', (debug) => {
74
+ const emitLog = enableDebugMode ? false : log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
75
+ })
76
76
  .on('warn', (warn) => {
77
77
  const emitLog = disableLogWarn ? false : log.warn(`Device: ${host} ${deviceName}, ${warn}.`);
78
78
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "1.5.1-beta.3",
4
+ "version": "1.5.1-beta.5",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceinfo.js CHANGED
@@ -76,6 +76,7 @@ class DeviceInfo extends EventEmitter {
76
76
  const obj = {
77
77
  deviceTypes: types,
78
78
  deviceName: deviceName,
79
+ sensorName: deviceName,
79
80
  friendlyNames: friendlyNames,
80
81
  modelName: modelName,
81
82
  serialNumber: addressMac,
package/src/sensors.js CHANGED
@@ -101,8 +101,8 @@ class Sensors extends EventEmitter {
101
101
  const obj = {
102
102
  name: key,
103
103
  time: sensorStatus.Time,
104
- tempUnit: sensorStatus.TempUnit === 'C' ? '°C' : 'F',
105
- pressureUnit: sensorStatus.PressureUnit ?? 'hPa',
104
+ tempUnit: sensorStatus.TempUnit,
105
+ pressureUnit: sensorStatus.PressureUnit,
106
106
 
107
107
  temperature: sensorData.Temperature,
108
108
  referenceTemperature: sensorData.ReferenceTemperature,
@@ -114,8 +114,9 @@ class Sensors extends EventEmitter {
114
114
  gas: sensorData.Gas,
115
115
  carbonDioxyde: sensorData.CarbonDioxyde,
116
116
  ambientLight: sensorData.Ambient,
117
- motion: sensorData.Motion ? sensorData.Motion === 'ON' : null
117
+ motion: sensorData.Motion
118
118
  }
119
+ obj.tempUnit = obj.tempUnit === 'C' ? '°C' : 'F';
119
120
 
120
121
  //energy
121
122
  const obj1 = {