diff --git a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/handler/ChannelActuatorPosition.java b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/handler/ChannelActuatorPosition.java index 81c93697e..bf9a9ee56 100644 --- a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/handler/ChannelActuatorPosition.java +++ b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/handler/ChannelActuatorPosition.java @@ -95,10 +95,18 @@ final class ChannelActuatorPosition extends ChannelHandlerTemplate { break; } + final VeluxExistingProducts existingProducts = thisBridgeHandler.existingProducts(); + GetProduct bcp = null; switch (channelId) { case CHANNEL_ACTUATOR_POSITION: case CHANNEL_ACTUATOR_STATE: + // apparently Somfy products do not to support new API; so use older API instead + if (existingProducts.get(veluxActuator.getProductBridgeIndex()).isSomfyProduct()) { + bcp = thisBridgeHandler.thisBridge.bridgeAPI().getProduct(); + break; + } + // fall through case CHANNEL_VANE_POSITION: bcp = thisBridgeHandler.thisBridge.bridgeAPI().getProductStatus(); default: @@ -118,7 +126,6 @@ final class ChannelActuatorPosition extends ChannelHandlerTemplate { VeluxProduct newProduct = bcp.getProduct(); ProductBridgeIndex productBridgeIndex = newProduct.getBridgeProductIndex(); - VeluxExistingProducts existingProducts = thisBridgeHandler.existingProducts(); VeluxProduct existingProduct = existingProducts.get(productBridgeIndex); ProductState productState = newProduct.getProductState(); switch (productState) { diff --git a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/things/VeluxProductPosition.java b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/things/VeluxProductPosition.java index b303fbb9e..851e277b1 100644 --- a/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/things/VeluxProductPosition.java +++ b/bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/things/VeluxProductPosition.java @@ -140,7 +140,7 @@ public class VeluxProductPosition { } public static boolean isUnknownOrValid(int position) { - return (position == VeluxProductPosition.VPP_UNKNOWN) || isValid(position); + return (position == VeluxProductPosition.VPP_VELUX_UNKNOWN) || isValid(position); } /**