Interface AccessoryWithRotationSpeed
-
public interface AccessoryWithRotationSpeed
accessory with rotation speed characteristics.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Double>
getRotationSpeed()
Retrieves the current speed of the rotationjava.util.concurrent.CompletableFuture<java.lang.Void>
setRotationSpeed(java.lang.Double speed)
Sets the speed of the rotationvoid
subscribeRotationSpeed(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the rotation speed.void
unsubscribeRotationSpeed()
Unsubscribes from changes in the rotation speed.
-
-
-
Method Detail
-
getRotationSpeed
java.util.concurrent.CompletableFuture<java.lang.Double> getRotationSpeed()
Retrieves the current speed of the rotation- Returns:
- a future that will contain the speed, expressed as an integer between 0 and 100.
-
setRotationSpeed
java.util.concurrent.CompletableFuture<java.lang.Void> setRotationSpeed(java.lang.Double speed) throws java.lang.Exception
Sets the speed of the rotation- Parameters:
speed
- the speed to set, expressed as an integer between 0 and 100.- Returns:
- a future that completes when the change is made
- Throws:
java.lang.Exception
- when the change cannot be made
-
subscribeRotationSpeed
void subscribeRotationSpeed(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the rotation speed.- Parameters:
callback
- the function to call when the speed changes.
-
unsubscribeRotationSpeed
void unsubscribeRotationSpeed()
Unsubscribes from changes in the rotation speed.
-
-