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.
Files changed (2) hide show
  1. package/index.js +4 -3
  2. 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 AccessPointDevice(api, config, openWrt, openWrtInfo); break;
93
- case 'switch': type = new SwitchDevice(api, config, device.switch, openWrt, openWrtInfo); break;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "OpenWrt Control",
3
3
  "name": "homebridge-openwrt-control",
4
- "version": "0.0.1-beta.0",
4
+ "version": "0.0.1-beta.2",
5
5
  "description": "Homebridge plugin to control OpenWrt flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",