homebridge-tasmota-control 0.7.2-beta.0 → 0.7.2-beta.2
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/tasmotadevice.js +1 -3
package/package.json
CHANGED
package/src/tasmotadevice.js
CHANGED
|
@@ -130,15 +130,13 @@ class TasmotaDevice {
|
|
|
130
130
|
if (statusSNSSupported) {
|
|
131
131
|
const sensorTypes = CONSTANS.StatusSNS;
|
|
132
132
|
const sensor = Object.entries(deviceInfo.StatusSNS)
|
|
133
|
-
.filter(([key]) => sensorTypes.includes(
|
|
133
|
+
.filter(([key]) => sensorTypes.some(type => key.includes(type)))
|
|
134
134
|
.reduce((obj, [key, value]) => {
|
|
135
135
|
obj[key] = value;
|
|
136
136
|
return obj;
|
|
137
137
|
}, {});
|
|
138
138
|
|
|
139
|
-
const debug = this.enableDebugMode ? this.log(`Device: ${this.host} ${this.name}, debug sensors: ${JSON.stringify(sensor, null, 2)}`) : false;
|
|
140
139
|
for (const [key, value] of Object.entries(sensor)) {
|
|
141
|
-
const debug = this.enableDebugMode ? this.log(`Device: ${this.host} ${this.name}, debug key: ${key} value: ${JSON.stringify(value, null, 2)}`) : false;
|
|
142
140
|
const obj = {
|
|
143
141
|
'name': key,
|
|
144
142
|
'data': value
|