homebridge-tasmota-control 1.6.15-beta.26 → 1.6.15-beta.27

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
@@ -33,9 +33,7 @@ class tasmotaPlatform {
33
33
 
34
34
  //check accessory is enabled
35
35
  const disableAccessory = device.disableAccessory || false;
36
- if (disableAccessory) {
37
- continue;
38
- }
36
+ if (disableAccessory) continue;
39
37
 
40
38
  const deviceName = device.name;
41
39
  const host = device.host;
@@ -53,7 +51,7 @@ class tasmotaPlatform {
53
51
  const refreshInterval = device.refreshInterval * 1000 || 5000;
54
52
  const enableDebugMode = device.enableDebugMode || false;
55
53
  const logLevel = {
56
- debug: enableDebugMode,
54
+ debug: device.enableDebugMode,
57
55
  info: !device.disableLogInfo,
58
56
  success: !device.disableLogSuccess,
59
57
  warn: !device.disableLogWarn,
@@ -71,7 +69,7 @@ class tasmotaPlatform {
71
69
 
72
70
  try {
73
71
  //get device info
74
- const deviceInfo = new DeviceInfo(url, auth, user, passwd, deviceName, loadNameFromDevice, enableDebugMode, refreshInterval)
72
+ const deviceInfo = new DeviceInfo(url, auth, user, passwd, deviceName, loadNameFromDevice, enableDebugMode)
75
73
  .on('debug', (msg) => logLevel.debug && log.info(`Device: ${host} ${deviceName}, debug: ${msg}`))
76
74
  .on('warn', (msg) => logLevel.warn && log.warn(`Device: ${host} ${deviceName}, ${msg}`))
77
75
  .on('error', (msg) => logLevel.error && log.error(`Device: ${host} ${deviceName}, ${msg}`));
@@ -106,7 +104,7 @@ class tasmotaPlatform {
106
104
  }
107
105
  });
108
106
  } catch (error) {
109
- log.error(`Device: ${host} ${deviceName}, Prepare files error: ${error}`);
107
+ if (logLevel.error) log.error(`Device: ${host} ${deviceName}, Prepare files error: ${error}`);
110
108
  return;
111
109
  }
112
110
 
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.15-beta.26",
4
+ "version": "1.6.15-beta.27",
5
5
  "description": "Homebridge plugin to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/deviceinfo.js CHANGED
@@ -3,7 +3,7 @@ import EventEmitter from 'events';
3
3
  import { ApiCommands, LightKeys, SensorKeys } from './constants.js';
4
4
 
5
5
  class DeviceInfo extends EventEmitter {
6
- constructor(url, auth, user, passwd, deviceName, loadNameFromDevice, enableDebugMode, refreshInterval) {
6
+ constructor(url, auth, user, passwd, deviceName, loadNameFromDevice, enableDebugMode) {
7
7
  super();
8
8
  this.name = deviceName
9
9
  this.loadNameFromDevice = loadNameFromDevice;