Interface AccessoryWithVerticalTilting
-
public interface AccessoryWithVerticalTiltingAccessory with vertical tilting characteristic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Integer>getCurrentVerticalTiltAngle()Retrieves the current vertical tilt angleCompletableFuture<Integer>getTargetVerticalTiltAngle()Retrieves the target vertical tilt angleCompletableFuture<Void>setTargetVerticalTiltAngle(int angle)Sets the target positionvoidsubscribeCurrentVerticalTiltAngle(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the current vertical tilt angle.voidsubscribeTargetVerticalTiltAngle(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the target vertical tilt angle.voidunsubscribeCurrentVerticalTiltAngle()Unsubscribes from changes in the current vertical tilt anglevoidunsubscribeTargetVerticalTiltAngle()Unsubscribes from changes in the target vertical tilt angle
-
-
-
Method Detail
-
getCurrentVerticalTiltAngle
CompletableFuture<Integer> getCurrentVerticalTiltAngle()
Retrieves the current vertical tilt angle- Returns:
- a future that will contain the position as a value between -90 and 90
-
getTargetVerticalTiltAngle
CompletableFuture<Integer> getTargetVerticalTiltAngle()
Retrieves the target vertical tilt angle- Returns:
- a future that will contain the target position as a value between -90 and 90
-
setTargetVerticalTiltAngle
CompletableFuture<Void> setTargetVerticalTiltAngle(int angle) throws Exception
Sets the target position- 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
-
subscribeCurrentVerticalTiltAngle
void subscribeCurrentVerticalTiltAngle(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the current vertical tilt angle.- Parameters:
callback- the function to call when the state changes.
-
subscribeTargetVerticalTiltAngle
void subscribeTargetVerticalTiltAngle(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the target vertical tilt angle.- Parameters:
callback- the function to call when the state changes.
-
unsubscribeCurrentVerticalTiltAngle
void unsubscribeCurrentVerticalTiltAngle()
Unsubscribes from changes in the current vertical tilt angle
-
unsubscribeTargetVerticalTiltAngle
void unsubscribeTargetVerticalTiltAngle()
Unsubscribes from changes in the target vertical tilt angle
-
-