Interface AccessoryWithColor


  • public interface AccessoryWithColor
    Accessory with Color
    Author:
    Andy Lintner
    • Method Detail

      • getHue

        CompletableFuture<Double> getHue()
        Retrieves the current hue of the light.
        Returns:
        a future that will contain the hue, expressed in arc degrees from 0 to 360.
      • setHue

        CompletableFuture<Void> setHue​(Double value)
                                throws Exception
        Sets the current hue of the light
        Parameters:
        value - the hue to set, expressed in arc degrees from 0 to 360.
        Returns:
        a future that completes when the hue is changed
        Throws:
        Exception - when the hue cannot be changed.
      • subscribeHue

        void subscribeHue​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the hue of the light.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeHue

        void unsubscribeHue()
        Unsubscribes from changes in the hue of the light.
      • getSaturation

        CompletableFuture<Double> getSaturation()
        Retrieves the saturation of the light.
        Returns:
        a future that will contain the saturation, expressed as a value between 0 and 100.
      • setSaturation

        CompletableFuture<Void> setSaturation​(Double value)
                                       throws Exception
        Sets the saturation of the light.
        Parameters:
        value - the saturation to set, expressed as a value between 0 and 100.
        Returns:
        a future that completes when the saturation is changed.
        Throws:
        Exception - when the saturation cannot be set.
      • subscribeSaturation

        void subscribeSaturation​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the saturation of the light.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeSaturation

        void unsubscribeSaturation()
        Unsubscribes from changes in the saturation of the light.