Interface AccessoryWithColorTemperature


  • public interface AccessoryWithColorTemperature
    Accessory with 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.