]> git.basschouten.com Git - openhab-addons.git/commitdiff
[mqtt.generic] Percentage range fix #10586 (#10587)
authorRogier Hofboer <rogier@hofboer.nl>
Mon, 21 Jun 2021 19:24:54 +0000 (21:24 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Jun 2021 19:24:54 +0000 (21:24 +0200)
Signed-off-by: Rogier Hofboer <rogier@hofboer.nl>
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/values/PercentageValue.java

index cf05552674d749d3c5712da28a0a12cac64d222f..a9f1e2c844cad416d4320ae6ec75872fedc45bfe 100644 (file)
@@ -154,7 +154,7 @@ public class PercentageValue extends Value {
 
     @Override
     public StateDescriptionFragmentBuilder createStateDescription(boolean readOnly) {
-        return super.createStateDescription(readOnly).withMaximum(max).withMinimum(min).withStep(step)
+        return super.createStateDescription(readOnly).withMaximum(HUNDRED).withMinimum(BigDecimal.ZERO).withStep(step)
                 .withPattern("%s %%");
     }
 }