homebridge-syntex-webhooks
Advanced tools
Comparing version 1.0.5-b28 to 1.0.5-b29
20
index.js
@@ -144,3 +144,10 @@ var request = require('request'); | ||
{ | ||
storage.load(urlParams.mac, (err, obj) => { | ||
var id = this.mac; | ||
if(urlParams.type) | ||
{ | ||
id += '-' + urlParams.type[0]; | ||
} | ||
storage.load(id, (err, obj) => { | ||
@@ -304,3 +311,10 @@ if(obj && !err) | ||
storage.load(this.mac, (err, obj) => { | ||
var id = this.mac; | ||
if(this.type == 'rain' || this.type == 'light' || this.type == 'temperature' || this.type == 'humidity') | ||
{ | ||
id += '-' + this.type[0]; | ||
} | ||
storage.load(id, (err, obj) => { | ||
@@ -544,3 +558,3 @@ if(obj && !err) | ||
var device = { | ||
id: obj.mac, | ||
id: obj.mac + '-' + obj.type[0], | ||
value: obj.value, | ||
@@ -547,0 +561,0 @@ type: obj.type |
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "1.0.5-b28", | ||
"version": "1.0.5-b29", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
58329
1146