From edc9aa68bc20343cdaa1a0e9c05c896b8ff8976e Mon Sep 17 00:00:00 2001 From: Sebastian Maier Date: Mon, 19 Oct 2020 14:26:20 +0200 Subject: [PATCH] Fix angle conversion (for inverted angles) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 461e858..96416c5 100755 --- a/index.js +++ b/index.js @@ -262,7 +262,7 @@ SmartHomeNGAccessory.prototype = { var callback = function (shngitem, value, inverted) { //this.log("[" + this.name + "] callback for " + characteristic.displayName); value = value * 3.6; - characteristic.setValue(inverted ? 100 - value : value, undefined, 'fromSHNG'); + characteristic.setValue(inverted ? 360 - value : value, undefined, 'fromSHNG'); }.bind(this); monitoring.push({name: name, characteristic: characteristic.displayName, item: shngitem, callback: callback, inverted: inverted}); },