homebridge-tasmota-control 1.6.2-beta.11 → 1.6.2-beta.12
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 -8
package/package.json
CHANGED
package/src/sensors.js
CHANGED
|
@@ -149,7 +149,7 @@ class Sensors extends EventEmitter {
|
|
|
149
149
|
try {
|
|
150
150
|
service?.getCharacteristic(charType)?.updateValue(value);
|
|
151
151
|
} catch (err) {
|
|
152
|
-
this.emit?.('warn', `Failed to update ${charType
|
|
152
|
+
this.emit?.('warn', `Failed to update ${charType}: ${err.message}`);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -175,19 +175,15 @@ class Sensors extends EventEmitter {
|
|
|
175
175
|
energyMap.forEach(([charType, value]) => {
|
|
176
176
|
try {
|
|
177
177
|
energyService?.getCharacteristic(charType)?.updateValue(value);
|
|
178
|
-
this.emit?.('debug', `Updated ${charType
|
|
178
|
+
this.emit?.('debug', `Updated ${charType}: ${value}`);
|
|
179
179
|
} catch (err) {
|
|
180
|
-
this.emit?.('warn', `Failed to update ${charType
|
|
180
|
+
this.emit?.('warn', `Failed to update ${charType}: ${err.message}`);
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
|
|
184
184
|
this.emit('warn', `Power: ${JSON.stringify(obj, null, 2)}`);
|
|
185
185
|
}
|
|
186
|
-
|
|
187
|
-
if (this.enableDebugMode) {
|
|
188
|
-
this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`);
|
|
189
|
-
}
|
|
190
|
-
|
|
186
|
+
const debug1 = this.enableDebugMode ? this.emit('debug', `Sensor: ${JSON.stringify(obj, null, 2)}`) : false;
|
|
191
187
|
i++;
|
|
192
188
|
}
|
|
193
189
|
|