Package io.github.hapjava.accessories
Interface HeaterCoolerAccessory
-
- All Superinterfaces:
HomekitAccessory
public interface HeaterCoolerAccessory extends HomekitAccessory
Heater Cooler accessory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<CurrentHeaterCoolerStateEnum>getCurrentHeaterCoolerState()Retrieves the heater /cooler current state.default CurrentHeaterCoolerStateEnum[]getCurrentHeaterCoolerStateValidValues()Valid values for current state.CompletableFuture<Double>getCurrentTemperature()Retrieves the current temperature, in celsius degrees.default Collection<Service>getServices()The collection of Services this accessory supports.CompletableFuture<TargetHeaterCoolerStateEnum>getTargetHeaterCoolerState()Retrieves the heater cooler target state.default TargetHeaterCoolerStateEnum[]getTargetHeaterCoolerStateValidValues()Valid values for target state.CompletableFuture<Boolean>isActive()Mandatory: Retrieves the current active state of the Heater Cooler.CompletableFuture<Void>setActive(boolean state)Sets the active state of the Heater CoolerCompletableFuture<Void>setTargetHeaterCoolerState(TargetHeaterCoolerStateEnum state)set heater cooler target state the lock target state.voidsubscribeActive(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the active state of the heater cooler .voidsubscribeCurrentHeaterCoolerState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the heater cooler current state.voidsubscribeCurrentTemperature(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the current temperature.voidsubscribeTargetHeaterCoolerState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the heater cooler target state.voidunsubscribeActive()Unsubscribes from changes in the active state of the heater cooler .voidunsubscribeCurrentHeaterCoolerState()Unsubscribes from changes in heater cooler current state.voidunsubscribeCurrentTemperature()Unsubscribes from changes in the current temperature.voidunsubscribeTargetHeaterCoolerState()Unsubscribes from changes in heater cooler target state.-
Methods inherited from interface io.github.hapjava.accessories.HomekitAccessory
getFirmwareRevision, getId, getManufacturer, getModel, getName, getPrimaryService, getSerialNumber, identify
-
-
-
-
Method Detail
-
getCurrentTemperature
CompletableFuture<Double> getCurrentTemperature()
Retrieves the current temperature, in celsius degrees.- Returns:
- a future that will contain the temperature.
-
isActive
CompletableFuture<Boolean> isActive()
Mandatory: Retrieves the current active state of the Heater Cooler.- Returns:
- a future that will contain the binary state
-
setActive
CompletableFuture<Void> setActive(boolean state) throws Exception
Sets the active state of the Heater Cooler- Parameters:
state- the binary state to set- Returns:
- a future that completes when the change is made
- Throws:
Exception- when the change cannot be made
-
getCurrentHeaterCoolerState
CompletableFuture<CurrentHeaterCoolerStateEnum> getCurrentHeaterCoolerState()
Retrieves the heater /cooler current state.- Returns:
- a future that will contain the heater cooler current state .
-
getTargetHeaterCoolerState
CompletableFuture<TargetHeaterCoolerStateEnum> getTargetHeaterCoolerState()
Retrieves the heater cooler target state.- Returns:
- a future that will contain the heater cooler target state .
-
setTargetHeaterCoolerState
CompletableFuture<Void> setTargetHeaterCoolerState(TargetHeaterCoolerStateEnum state)
set heater cooler target state the lock target state.- Parameters:
state- heater cooler target state- Returns:
- a future that completes when the change is made
-
subscribeCurrentHeaterCoolerState
void subscribeCurrentHeaterCoolerState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the heater cooler current state.- Parameters:
callback- the function to call when the state changes.
-
unsubscribeCurrentHeaterCoolerState
void unsubscribeCurrentHeaterCoolerState()
Unsubscribes from changes in heater cooler current state.
-
subscribeTargetHeaterCoolerState
void subscribeTargetHeaterCoolerState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the heater cooler target state.- Parameters:
callback- the function to call when the state changes.
-
unsubscribeTargetHeaterCoolerState
void unsubscribeTargetHeaterCoolerState()
Unsubscribes from changes in heater cooler target state.
-
subscribeActive
void subscribeActive(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the active state of the heater cooler .- Parameters:
callback- the function to call when the active state changes.
-
unsubscribeActive
void unsubscribeActive()
Unsubscribes from changes in the active state of the heater cooler .
-
subscribeCurrentTemperature
void subscribeCurrentTemperature(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the current temperature.- Parameters:
callback- the function to call when the state changes.
-
unsubscribeCurrentTemperature
void unsubscribeCurrentTemperature()
Unsubscribes from changes in the current temperature.
-
getCurrentHeaterCoolerStateValidValues
default CurrentHeaterCoolerStateEnum[] getCurrentHeaterCoolerStateValidValues()
Valid values for current state.- Returns:
- array of valid current states
-
getTargetHeaterCoolerStateValidValues
default TargetHeaterCoolerStateEnum[] getTargetHeaterCoolerStateValidValues()
Valid values for target state.- Returns:
- array of valid target states
-
getServices
default Collection<Service> getServices()
Description copied from interface:HomekitAccessoryThe 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:
getServicesin interfaceHomekitAccessory- Returns:
- the collection of services.
-
-