diff --git a/switch.js b/switch.js index 941906e..79bcfe3 100644 --- a/switch.js +++ b/switch.js @@ -19,7 +19,7 @@ function runLoop() { { method: "POST", url: CONFIG.pollingUrl, body: '{"801":{"170":null}}', timeout: 10 }, function (res, error_code, error_msg, ud) { print("errors-http-post:", error_code, error_msg); - if (error_code === 0) { + if (error_code === 0) { // do this so that during timeout no crash let parsedBody = JSON.parse(res.body); let production = parsedBody["801"]["170"]["101"]; let consumption = parsedBody["801"]["170"]["110"];