Closed Ersthelfer closed 3 years ago
It looks like the is an issues in the function setLevelPercentage
// Dimm the device, allowed values are 0 - 100 module.exports.setLevelPercentage = function(sid, ain, levelInPercent, options) { return executeCommand(sid, 'setlevelpercentage&level=' + level2api(level,true), ain, options).then(function(body) { // api does not return a value return level; }); };
I think the call
level2api(level....
must be
level2api(levelInPercent...
// Dimm the device, allowed values are 0 - 100 module.exports.setLevelPercentage = function(sid, ain, levelInPercent, options) { return executeCommand(sid, 'setlevelpercentage&level=' + level2api(levelInPercent,true), ain, options).then(function(body) { // api does not return a value return level; }); };
It looks like the is an issues in the function setLevelPercentage
// Dimm the device, allowed values are 0 - 100 module.exports.setLevelPercentage = function(sid, ain, levelInPercent, options) { return executeCommand(sid, 'setlevelpercentage&level=' + level2api(level,true), ain, options).then(function(body) { // api does not return a value return level; }); };
I think the call
level2api(level....
must be
level2api(levelInPercent...
// Dimm the device, allowed values are 0 - 100 module.exports.setLevelPercentage = function(sid, ain, levelInPercent, options) { return executeCommand(sid, 'setlevelpercentage&level=' + level2api(levelInPercent,true), ain, options).then(function(body) { // api does not return a value return level; }); };