Rollershutter window_covering "Window Rollershutter" {homekit = "WindowCovering" [stop=true, stopSameDirection=true]}
```
+Some blinds devices do not support going to a specific position, even though they are modeled as Rollershutter items.
+The Home App only sends exact percentages by default.
+To avoid creating a rule, you can have the HomeKit addon translate 0%/100% to UP/DOWN commands.
+
+```java
+Rollershutter window_covering "Window Rollershutter" {homekit = "WindowCovering" [sendUpDownForExtents=true]}
+```
+
Window covering can have a number of optional characteristics like horizontal & vertical tilt, obstruction status and hold position trigger.
If your blind supports tilt, and you want to control tilt via HomeKit you need to define blind as a group.
e.g.
public static final String UNIT = "unit";
public static final String EMULATE_STOP_STATE = "stop";
public static final String EMULATE_STOP_SAME_DIRECTION = "stopSameDirection";
+ public static final String SEND_UP_DOWN_FOR_EXTENTS = "sendUpDownForExtents";
private static final Map<Integer, String> CREATED_ACCESSORY_IDS = new ConcurrentHashMap<>();
private final Map<PositionStateEnum, String> positionStateMapping;
protected boolean emulateState;
protected boolean emulateStopSameDirection;
+ protected boolean sendUpDownForExtents;
protected PositionStateEnum emulatedState = PositionStateEnum.STOPPED;
public AbstractHomekitPositionAccessoryImpl(HomekitTaggedItem taggedItem,
emulateState = getAccessoryConfigurationAsBoolean(HomekitTaggedItem.EMULATE_STOP_STATE, false);
emulateStopSameDirection = getAccessoryConfigurationAsBoolean(HomekitTaggedItem.EMULATE_STOP_SAME_DIRECTION,
false);
+ sendUpDownForExtents = getAccessoryConfigurationAsBoolean(HomekitTaggedItem.SEND_UP_DOWN_FOR_EXTENTS, false);
closedPosition = inverted ? 0 : 100;
openPosition = inverted ? 100 : 0;
positionStateMapping = createMapping(POSITION_STATE, PositionStateEnum.class);
}
emulatedState = PositionStateEnum.STOPPED;
} else {
- itemAsRollerShutterItem.send(new PercentType(targetPosition));
+ if (sendUpDownForExtents && targetPosition == 0) {
+ itemAsRollerShutterItem.send(UpDownType.UP);
+ } else if (sendUpDownForExtents && targetPosition == 100) {
+ itemAsRollerShutterItem.send(UpDownType.DOWN);
+ } else {
+ itemAsRollerShutterItem.send(new PercentType(targetPosition));
+ }
if (emulateState) {
@Nullable
PercentType currentPosition = item.getStateAs(PercentType.class);