homebridge-openwrt-control 0.0.2-beta.28 → 0.0.2-beta.29

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.
Files changed (2) hide show
  1. package/index.js +5 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -60,12 +60,11 @@ class OpenWrtPlatform {
60
60
  log.info(`Device: ${host} ${name}, Config: ${JSON.stringify(safeConfig, null, 2)}`);
61
61
  }
62
62
 
63
- const devices = [];
63
+ const configuredDevices = [];
64
64
  const refreshInterval = (deviceConfig.refreshInterval ?? 5) * 1000;
65
- if (deviceConfig.accessPoint?.enable) devices.push('accessPoint');
66
- if (deviceConfig.switch?.enable) devices.push('switch');
67
-
68
- if (this.devices.length === 0) return;
65
+ if (deviceConfig.accessPoint?.enable) configuredDevices.push('accessPoint');
66
+ if (deviceConfig.switch?.enable) configuredDevices.push('switch');
67
+ if (configuredDevices.length === 0) return;
69
68
 
70
69
  const openWrt = new OpenWrt(deviceConfig)
71
70
  .on('success', msg => logLevel.success && log.success(`Device: ${host}, ${msg}`))
@@ -81,7 +80,7 @@ class OpenWrtPlatform {
81
80
  }
82
81
 
83
82
  try {
84
- for (const device of devices) {
83
+ for (const device of configuredDevices) {
85
84
  // create impulse generator
86
85
  const impulseGenerator = new ImpulseGenerator()
87
86
  .on('start', async () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "OpenWrt Control",
3
3
  "name": "homebridge-openwrt-control",
4
- "version": "0.0.2-beta.28",
4
+ "version": "0.0.2-beta.29",
5
5
  "description": "Homebridge plugin to control OpenWrt flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",