Interface AccessoryWithFanState


  • public interface AccessoryWithFanState
    An accessory with current and target fan states.
    Author:
    Andy Lintner
    • 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.