From 275a88d358b70386b7f8f3e102345e5fe335573d Mon Sep 17 00:00:00 2001 From: bezzers Date: Fri, 24 Jul 2015 09:45:52 -0400 Subject: [PATCH] Fix logic issue in error reporting --- accessories/Tesla.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accessories/Tesla.js b/accessories/Tesla.js index 29e9d48..016a465 100644 --- a/accessories/Tesla.js +++ b/accessories/Tesla.js @@ -17,7 +17,7 @@ TeslaAccessory.prototype = { if (powerOn) { tesla.auto_conditioning({id:vehicle, climate: 'start'}, function(response) { - if (!response.result) + if (response.result) that.log("Started climate control."); else that.log("Error starting climate control: " + response.reason); @@ -25,10 +25,10 @@ TeslaAccessory.prototype = { } else { tesla.auto_conditioning({id:vehicle, climate: 'stop'}, function(response) { - if (!response.result) + if (response.result) that.log("Stopped climate control."); else - that.log("Error starting climate control: " + response.reason); + that.log("Error stopping climate control: " + response.reason); }); } })