Interface AccessoryWithFanState
-
public interface AccessoryWithFanStateAn accessory with current and target fan states.- Author:
- Andy Lintner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<CurrentFanStateEnum>getCurrentFanState()Retrieves the current state of the fan (INACTIVE, IDLE, BLOWING AIR).java.util.concurrent.CompletableFuture<TargetFanStateEnum>getTargetFanState()Retrieves the target state of the fan (MANUAL, AUTO).java.util.concurrent.CompletableFuture<java.lang.Void>setTargetFanState(TargetFanStateEnum targetState)Set the target state of the fan (MANUAL, AUTO).voidsubscribeCurrentFanState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the current fan state.voidsubscribeTargetFanState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the target fan state.voidunsubscribeCurrentFanState()Unsubscribes from changes in the current state of the fan.voidunsubscribeTargetFanState()Unsubscribes from changes in the target state of the fan.
-
-
-
Method Detail
-
getCurrentFanState
java.util.concurrent.CompletableFuture<CurrentFanStateEnum> getCurrentFanState()
Retrieves the current state of the fan (INACTIVE, IDLE, BLOWING AIR).- Returns:
- a future that will contain the state
-
getTargetFanState
java.util.concurrent.CompletableFuture<TargetFanStateEnum> getTargetFanState()
Retrieves the target state of the fan (MANUAL, AUTO).- Returns:
- a future that will contain the state
-
setTargetFanState
java.util.concurrent.CompletableFuture<java.lang.Void> setTargetFanState(TargetFanStateEnum targetState)
Set the target state of the fan (MANUAL, AUTO).- Parameters:
targetState- target state- Returns:
- a future that completes when the change is made
-
subscribeCurrentFanState
void subscribeCurrentFanState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the current fan state.- Parameters:
callback- the function to call when the direction changes.
-
subscribeTargetFanState
void subscribeTargetFanState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the target fan state.- Parameters:
callback- the function to call when the direction changes.
-
unsubscribeCurrentFanState
void unsubscribeCurrentFanState()
Unsubscribes from changes in the current state of the fan.
-
unsubscribeTargetFanState
void unsubscribeTargetFanState()
Unsubscribes from changes in the target state of the fan.
-
-