[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 <github@fabian-wolter.de>
This commit is contained in:
Fabian Wolter 2020-10-18 20:39:42 +02:00 committed by GitHub
parent 5fe7cc5810
commit ae1d59cf99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}