Interface AccessoryWithTargetTilting
-
public interface AccessoryWithTargetTiltingAccessory with target tilting characteristic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Integer>getTargetTiltAngle()Retrieves the target tilt angleCompletableFuture<Void>setTargetTiltAngle(int angle)Sets the target tilt anglevoidsubscribeTargetTiltAngle(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the target tilt angle.voidunsubscribeTargetTiltAngle()Unsubscribes from changes in the target tilt angle
-
-
-
Method Detail
-
getTargetTiltAngle
CompletableFuture<Integer> getTargetTiltAngle()
Retrieves the target tilt angle- Returns:
- a future that will contain the target position as a value between -90 and 90
-
setTargetTiltAngle
CompletableFuture<Void> setTargetTiltAngle(int angle) throws Exception
Sets the target tilt angle- Parameters:
angle- the target angle to set, as a value between -90 and 90- Returns:
- a future that completes when the change is made
- Throws:
Exception- when the change cannot be made
-
subscribeTargetTiltAngle
void subscribeTargetTiltAngle(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the target tilt angle.- Parameters:
callback- the function to call when the state changes.
-
unsubscribeTargetTiltAngle
void unsubscribeTargetTiltAngle()
Unsubscribes from changes in the target tilt angle
-
-