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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "0.7.2-beta.0",
4
+ "version": "0.7.2-beta.2",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -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(key))
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