Fix angle conversion (for inverted angles)
This commit is contained in:
parent
0155a5557e
commit
edc9aa68bc
2
index.js
2
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});
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user