From 8934554dfdbde7a9649fcbff3ceffb56a0334f1d Mon Sep 17 00:00:00 2001 From: Fabian Wolter Date: Sun, 18 Oct 2020 20:39:42 +0200 Subject: [PATCH] [lcn] Fix status message of RollerShutter inverting (#8735) * [lcn] Fix status message of RollerShutter inverting The status of RollerShutter was not inverted when invertUpDown=true. Fixes #8680 Signed-off-by: Fabian Wolter (cherry picked from commit ae1d59cf993621402b1765ebb9212ed8bb71375b) --- .../org/openhab/binding/lcn/internal/LcnModuleHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/LcnModuleHandler.java b/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/LcnModuleHandler.java index 13098172bf9..552400a12dd 100644 --- a/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/LcnModuleHandler.java +++ b/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/LcnModuleHandler.java @@ -112,7 +112,8 @@ public class LcnModuleHandler extends BaseThingHandler { for (Channel channel : thing.getChannels()) { Object unitObject = channel.getConfiguration().get("unit"); Object parameterObject = channel.getConfiguration().get("parameter"); - Object invertConfig = channel.getConfiguration().get("invertState"); + Object invertState = channel.getConfiguration().get("invertState"); + Object invertUpDown = channel.getConfiguration().get("invertUpDown"); // Initialize value converters if (unitObject instanceof String) { @@ -130,7 +131,7 @@ public class LcnModuleHandler extends BaseThingHandler { } // Initialize inversion converter - if (invertConfig instanceof Boolean && invertConfig.equals(true)) { + if (Boolean.TRUE.equals(invertState) || Boolean.TRUE.equals(invertUpDown)) { converters.put(channel.getUID(), INVERSION_CONVERTER); }