Interface AccessoryWithActive
-
public interface AccessoryWithActive
Accessory with active characteristicActiveCharacteristic
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ActiveEnum>
getActive()
Retrieves the active state (seeActiveEnum
for supported values).java.util.concurrent.CompletableFuture<java.lang.Void>
setActive(ActiveEnum active)
Set the active state (seeActiveEnum
for supported values).void
subscribeActive(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the active state.void
unsubscribeActive()
Unsubscribes from changes in the active state.
-
-
-
Method Detail
-
getActive
java.util.concurrent.CompletableFuture<ActiveEnum> getActive()
Retrieves the active state (seeActiveEnum
for supported values).- Returns:
- a future that will contain the active state
-
setActive
java.util.concurrent.CompletableFuture<java.lang.Void> setActive(ActiveEnum active)
Set the active state (seeActiveEnum
for supported values).- Parameters:
active
- active state- Returns:
- a future that completes when the change is made
-
subscribeActive
void subscribeActive(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the active state.- Parameters:
callback
- the function to call when the active state changes.
-
unsubscribeActive
void unsubscribeActive()
Unsubscribes from changes in the active state.
-
-