homebridge-ipark-hb 1.2.0 → 1.2.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 +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  let Service, Characteristic;
2
- const Lightbulb = require("./lightbulb");
2
+ const LightbulbPlugin = require("./lightbulb");
3
3
 
4
4
  module.exports = (api) => {
5
5
  Service = api.hap.Service;
@@ -13,7 +13,7 @@ class Platform {
13
13
  this.config = config;
14
14
  this.api = api;
15
15
  this.accessories = [];
16
-
16
+ this.lightulb = new LightbulbPlugin(log, config, api);
17
17
  api.on("didFinishLaunching", async () => {
18
18
  await this.initialize();
19
19
  });
@@ -26,7 +26,7 @@ class Platform {
26
26
  async initialize() {
27
27
  let devices = [];
28
28
  try {
29
- devices = await Lightbulb.discover(this);
29
+ devices = await this.lightulb.discoverDevices();
30
30
  } catch (e) {
31
31
  this.log.error("Discovery failed", e.message);
32
32
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-ipark-hb",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"