homebridge-syntex-webhooks
Advanced tools
Comparing version 1.0.5-b21 to 1.0.5-b22
25
index.js
@@ -21,2 +21,3 @@ var request = require('request'); | ||
var config; | ||
var storage; | ||
@@ -34,3 +35,3 @@ function SynTexWebHookPlatform(slog, sconfig, api) | ||
this.storage = store(this.cacheDirectory); | ||
storage = store(this.cacheDirectory); | ||
} | ||
@@ -46,3 +47,3 @@ | ||
{ | ||
var Sensor = new SynTexWebHookSensorAccessory(this.sensors[i], this.storage); | ||
var Sensor = new SynTexWebHookSensorAccessory(this.sensors[i], storage); | ||
accessories.push(Sensor); | ||
@@ -53,3 +54,3 @@ } | ||
{ | ||
var Switch = new SynTexWebHookSwitchAccessory(this.switches[i], this.storage); | ||
var Switch = new SynTexWebHookSwitchAccessory(this.switches[i], storage); | ||
accessories.push(Switch); | ||
@@ -112,3 +113,3 @@ } | ||
{ | ||
this.storage.load(urlParams.mac, (err, obj) => { | ||
storage.load(urlParams.mac, (err, obj) => { | ||
@@ -181,3 +182,3 @@ if(obj && !err) | ||
this.type = sensorConfig["type"]; | ||
this.storage = storage; | ||
storage = storage; | ||
@@ -300,3 +301,3 @@ if(this.type === "contact") | ||
this.storage.load(this.mac, (err, obj) => { | ||
storage.load(this.mac, (err, obj) => { | ||
@@ -371,3 +372,3 @@ if(obj && !err) | ||
this.offHeaders = switchConfig["off_headers"] || "{}"; | ||
this.storage = storage; | ||
storage = storage; | ||
@@ -389,3 +390,3 @@ this.service = new Service.Switch(this.name); | ||
this.storage.load('storage', (err, obj) => { | ||
storage.load('storage', (err, obj) => { | ||
@@ -441,3 +442,3 @@ if(obj && !err) | ||
this.storage.load('storage', (err, obj) => { | ||
storage.load('storage', (err, obj) => { | ||
@@ -463,3 +464,3 @@ if(obj && !err) | ||
this.storage.add(obj, (err) => { | ||
storage.add(obj, (err) => { | ||
@@ -479,3 +480,3 @@ if(err) | ||
this.storage.add(device, (err) => { | ||
storage.add(device, (err) => { | ||
@@ -557,3 +558,3 @@ if(err) | ||
this.storage.add(device, (err) => { | ||
storage.add(device, (err) => { | ||
@@ -560,0 +561,0 @@ if(err) |
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "1.0.5-b21", | ||
"version": "1.0.5-b22", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1102
2
56568