Interface AccessoryWithDuration


  • public interface AccessoryWithDuration
    Accessory with duration characteristic.
    • Method Detail

      • getSetDuration

        java.util.concurrent.CompletableFuture<java.lang.Integer> getSetDuration()
        Retrieves the current set duration;
        Returns:
        a future with the value
      • getMinDuration

        default int getMinDuration()
        return the min value for duration. overwrite if you want to change the default value.
        Returns:
        min remaining duration
      • getMaxDuration

        default int getMaxDuration()
        return the max value for duration. overwrite if you want to change the default value.
        Returns:
        max duration
      • setSetDuration

        java.util.concurrent.CompletableFuture<java.lang.Void> setSetDuration​(int value)
        Sets the duration for which the service should run.
        Parameters:
        value - duration in seconds
        Returns:
        a future that completes when the change is made
      • subscribeSetDuration

        void subscribeSetDuration​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the set duration
        Parameters:
        callback - the function when the duration has changed
      • unsubscribeSetDuration

        void unsubscribeSetDuration()
        Unsubscribes from changes