homebridge-openwrt-control 0.0.1-beta.0 → 0.0.1-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/index.js +4 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
import { mkdirSync, existsSync, writeFileSync } from 'fs';
|
|
3
|
-
import AccessPointDevice from './src/apdevice.js';
|
|
4
3
|
import OpenWrt from './src/openwrt.js';
|
|
4
|
+
import AccessPoint from './src/apdevice.js';
|
|
5
|
+
import Switch from './src/swdevice.js';
|
|
5
6
|
import ImpulseGenerator from './src/impulsegenerator.js';
|
|
6
7
|
import { PluginName, PlatformName } from './src/constants.js';
|
|
7
8
|
|
|
@@ -89,8 +90,8 @@ class OpenWrtPlatform {
|
|
|
89
90
|
// create device instance
|
|
90
91
|
let type;
|
|
91
92
|
switch (device) {
|
|
92
|
-
case 'accessPoint': type = new
|
|
93
|
-
case 'switch': type = new
|
|
93
|
+
case 'accessPoint': type = new AccessPoint(api, config, openWrt, openWrtInfo); break;
|
|
94
|
+
case 'switch': type = new Switch(api, config, openWrt, openWrtInfo); break;
|
|
94
95
|
default:
|
|
95
96
|
if (logLevel.warn) log.warn(`Device: ${host} ${name}, unknown zone: ${zoneControl}`);
|
|
96
97
|
return;
|
package/package.json
CHANGED