Interface AccessoryWithFanState
-
public interface AccessoryWithFanState
An 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).void
subscribeCurrentFanState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the current fan state.void
subscribeTargetFanState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the target fan state.void
unsubscribeCurrentFanState()
Unsubscribes from changes in the current state of the fan.void
unsubscribeTargetFanState()
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.
-
-