Interface AccessoryWithColorTemperature
-
public interface AccessoryWithColorTemperatureAccessory with color temperature.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<Integer>getColorTemperature()Retrieves the color temperaturedefault intgetMaxColorTemperature()return the max value for color temperature.default intgetMinColorTemperature()return the min value for color temperature.CompletableFuture<Void>setColorTemperature(Integer value)Sets the color temperaturevoidsubscribeColorTemperature(HomekitCharacteristicChangeCallback callback)Subscribes to changes in color temperature.voidunsubscribeColorTemperature()Unsubscribes from changes in the color temperature.
-
-
-
Method Detail
-
getColorTemperature
CompletableFuture<Integer> getColorTemperature()
Retrieves the color temperature- Returns:
- a future that will contain the brightness, expressed as an integer between 0 and 100.
-
setColorTemperature
CompletableFuture<Void> setColorTemperature(Integer value) throws Exception
Sets the color temperature- Parameters:
value- the brightness, on a scale of 0 to 100, to set- Returns:
- a future that completes when the brightness is changed
- Throws:
Exception- when the brightness cannot be set
-
getMinColorTemperature
default int getMinColorTemperature()
return the min value for color temperature. overwrite if you want to change the default value.- Returns:
- min color temperature
-
getMaxColorTemperature
default int getMaxColorTemperature()
return the max value for color temperature. overwrite if you want to change the default value.- Returns:
- max color temperature
-
subscribeColorTemperature
void subscribeColorTemperature(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in color temperature.- Parameters:
callback- the function to call when the color temperature changes.
-
unsubscribeColorTemperature
void unsubscribeColorTemperature()
Unsubscribes from changes in the color temperature.
-
-