Interface AccessoryWithLockTargetState
-
public interface AccessoryWithLockTargetState
Accessory with lock target state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<LockTargetStateEnum>
getLockTargetState()
Retrieves the lock states.java.util.concurrent.CompletableFuture<java.lang.Void>
setLockTargetState(LockTargetStateEnum state)
Sets the lock target statevoid
subscribeLockTargetState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in lock target state.void
unsubscribeLockTargetState()
Unsubscribes from changes
-
-
-
Method Detail
-
getLockTargetState
java.util.concurrent.CompletableFuture<LockTargetStateEnum> getLockTargetState()
Retrieves the lock states. The target state of the physical security mechanism (e.g. deadbolt)- Returns:
- a future with the value
-
setLockTargetState
java.util.concurrent.CompletableFuture<java.lang.Void> setLockTargetState(LockTargetStateEnum state) throws java.lang.Exception
Sets the lock target state- Parameters:
state
- the target state to set- Returns:
- a future that completes when the change is made
- Throws:
java.lang.Exception
- when the change cannot be made
-
subscribeLockTargetState
void subscribeLockTargetState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in lock target state.- Parameters:
callback
- the function when the lock target state changes
-
unsubscribeLockTargetState
void unsubscribeLockTargetState()
Unsubscribes from changes
-
-