Package io.github.hapjava.accessories
Interface SlatAccessory
-
- All Superinterfaces:
HomekitAccessory
public interface SlatAccessory extends HomekitAccessory
A slat accessory which tilts on a vertical or a horizontal axis.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Collection<Service>
getServices()
The collection of Services this accessory supports.java.util.concurrent.CompletableFuture<CurrentSlatStateEnum>
getSlatState()
Retrieves the current state of the slatjava.util.concurrent.CompletableFuture<SlatTypeEnum>
getSlatType()
Retrieves the slat type.void
subscribeSlatState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the state of the slat.void
unsubscribeSlatState()
Unsubscribes from changes in the state of the slat.-
Methods inherited from interface io.github.hapjava.accessories.HomekitAccessory
getFirmwareRevision, getId, getManufacturer, getModel, getName, getPrimaryService, getSerialNumber, identify
-
-
-
-
Method Detail
-
getSlatState
java.util.concurrent.CompletableFuture<CurrentSlatStateEnum> getSlatState()
Retrieves the current state of the slat- Returns:
- a future that will contain the state
-
subscribeSlatState
void subscribeSlatState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the state of the slat.- Parameters:
callback
- the function to call when the state changes.
-
unsubscribeSlatState
void unsubscribeSlatState()
Unsubscribes from changes in the state of the slat.
-
getSlatType
java.util.concurrent.CompletableFuture<SlatTypeEnum> getSlatType()
Retrieves the slat type.- Returns:
- a future that will slat type.
-
getServices
default java.util.Collection<Service> getServices()
Description copied from interface:HomekitAccessory
The collection of Services this accessory supports. Services are the primary way to interact with the accessory via HomeKit. Besides the Services offered here, the accessory will automatically include the required information service.This method will only be useful if you're implementing your own accessory type. For the standard accessories, use the default implementation provided by the interfaces in
io.github.hapjava.accessories
.- Specified by:
getServices
in interfaceHomekitAccessory
- Returns:
- the collection of services.
-
-