From c26966e9c5623d554a4853588b185f60c86f05ca Mon Sep 17 00:00:00 2001 From: dw-8 Date: Sun, 25 Jul 2021 01:11:31 -0400 Subject: [PATCH] Revert "Add support for group item type to window covering (#10936)" This reverts commit 66252b4bab403e961a42adc5c84a7d5788981b58. Signed-off-by: dw-8 --- .../accessories/AbstractHomekitPositionAccessoryImpl.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java index aa307fdffe979..516e305e564b9 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/AbstractHomekitPositionAccessoryImpl.java @@ -24,7 +24,6 @@ import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; -import org.openhab.core.items.GroupItem; import org.openhab.core.items.Item; import org.openhab.core.library.items.DimmerItem; import org.openhab.core.library.items.NumberItem; @@ -85,19 +84,12 @@ public CompletableFuture setTargetPosition(int value) { getCharacteristic(TARGET_POSITION).ifPresentOrElse(taggedItem -> { final Item item = taggedItem.getItem(); final int targetPosition = convertPosition(value, openPosition); - if (item instanceof RollershutterItem) { ((RollershutterItem) item).send(new PercentType(targetPosition)); } else if (item instanceof DimmerItem) { ((DimmerItem) item).send(new PercentType(targetPosition)); } else if (item instanceof NumberItem) { ((NumberItem) item).send(new DecimalType(targetPosition)); - } else if (item instanceof GroupItem && ((GroupItem) item).getBaseItem() instanceof RollershutterItem) { - ((GroupItem) item).send(new PercentType(targetPosition)); - } else if (item instanceof GroupItem && ((GroupItem) item).getBaseItem() instanceof DimmerItem) { - ((GroupItem) item).send(new PercentType(targetPosition)); - } else if (item instanceof GroupItem && ((GroupItem) item).getBaseItem() instanceof NumberItem) { - ((GroupItem) item).send(new DecimalType(targetPosition)); } else { logger.warn( "Unsupported item type for characteristic {} at accessory {}. Expected Rollershutter, Dimmer or Number item, got {}",