Interface AccessoryWithRemainingDuration
- 
 public interface AccessoryWithRemainingDurationAccessory with remaining duration characteristic.- Author:
- Tim Harper
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetMaxRemainingDuration()return the max value for remaining duration.default intgetMinRemainingDuration()return the min value for remaining duration.java.util.concurrent.CompletableFuture<java.lang.Integer>getRemainingDuration()Retrieves the remaining durationvoidsubscribeRemainingDuration(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the duration; note it is not necessary to emit a change every second, homekit infers the countdown progress client side.voidunsubscribeRemainingDuration()Unsubscribes from changes
 
- 
- 
- 
Method Detail- 
getRemainingDurationjava.util.concurrent.CompletableFuture<java.lang.Integer> getRemainingDuration() Retrieves the remaining duration- Returns:
- a future with the duration in seconds
 
 - 
getMinRemainingDurationdefault int getMinRemainingDuration() return the min value for remaining duration. overwrite if you want to change the default value.- Returns:
- min remaining duration
 
 - 
getMaxRemainingDurationdefault int getMaxRemainingDuration() return the max value for remaining duration. overwrite if you want to change the default value.- Returns:
- max remaining duration
 
 - 
subscribeRemainingDurationvoid subscribeRemainingDuration(HomekitCharacteristicChangeCallback callback) Subscribes to changes in the duration; note it is not necessary to emit a change every second, homekit infers the countdown progress client side.- Parameters:
- callback- the function when the existing duration has been replaced with a new one.
 
 - 
unsubscribeRemainingDurationvoid unsubscribeRemainingDuration() Unsubscribes from changes
 
- 
 
-