mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-12 14:23:08 +01:00
log adjustments
This commit is contained in:
@@ -50,11 +50,9 @@ function SmartThingsAccessory(log, name, commands) {
|
|||||||
SmartThingsAccessory.prototype = {
|
SmartThingsAccessory.prototype = {
|
||||||
|
|
||||||
command: function(c,value) {
|
command: function(c,value) {
|
||||||
this.log("Received command " + c);
|
this.log(this.name + " sending command " + c);
|
||||||
var url;
|
var url = this.commands[c];
|
||||||
if (value == undefined) {
|
if (value != undefined) {
|
||||||
url = this.commands[c];
|
|
||||||
} else {
|
|
||||||
url = this.commands[c] + "&value="+value
|
url = this.commands[c] + "&value="+value
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +61,10 @@ SmartThingsAccessory.prototype = {
|
|||||||
url: url
|
url: url
|
||||||
}, function(err, response) {
|
}, function(err, response) {
|
||||||
if (err) {
|
if (err) {
|
||||||
that.log("There was a problem sending command " + c + " to SmartThings");
|
that.log("There was a problem sending command " + c + " to" + that.name);
|
||||||
that.log(url);
|
that.log(url);
|
||||||
} else {
|
} else {
|
||||||
that.log("Sent command " + c);
|
that.log(that.name + " sent command " + c);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user