diff --git a/lib/system/capabilities/windowcoverings_set/windowCovering.js b/lib/system/capabilities/windowcoverings_set/windowCovering.js index 471c953..bdbd624 100644 --- a/lib/system/capabilities/windowcoverings_set/windowCovering.js +++ b/lib/system/capabilities/windowcoverings_set/windowCovering.js @@ -50,7 +50,7 @@ module.exports = { await this.setCapabilityValue('windowcoverings_set', value); return null; } - const mappedValue = mapValueRange(0, 1, 100, 0, value); + const mappedValue = mapValueRange(0, 1, 0, 100, value); const gotToLiftPercentageCommand = { // Round, otherwise might not be accepted by device percentageLiftValue: Math.round(mappedValue), @@ -69,7 +69,7 @@ module.exports = { if (value < 0 || value > 100) return null; // Parse input value - const parsedValue = mapValueRange(0, 100, 1, 0, value); + const parsedValue = mapValueRange(0, 100, 0, 1, value); // Refresh timer if needed if (this._reportPercentageDebounce) {