Interface AccessoryWithTargetTilting
-
public interface AccessoryWithTargetTiltingAccessory with target tilting characteristic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Integer>getTargetTiltAngle()Retrieves the target tilt anglejava.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Integer> getTargetTiltAngle()
Retrieves the target tilt angle- Returns:
- a future that will contain the target position as a value between -90 and 90
-
setTargetTiltAngle
java.util.concurrent.CompletableFuture<java.lang.Void> setTargetTiltAngle(int angle) throws java.lang.ExceptionSets 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:
java.lang.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
-
-