Interface Light

All Superinterfaces:
Device
All Known Implementing Classes:
LightImpl

public interface Light
extends Device
A single Philips Hue -compatible light. Could be a bulb, a ceiling fixture, a LED strip, or anything in between. Even remote controlled wall sockets are considered as "lights" by the Hue Bridge.
Since:
3.0.0
  • Method Summary

    Modifier and Type Method Description
    UUID getId()
    Returns the technical id of the light, as assigned by the Bridge.
    String getName()
    Returns the name of the light, as set by the user.
    UUID getOwnerId()
    Returns the technical id of the device that "owns" this light, as assigned by the Bridge.
    Collection<EffectType> getSupportedEffects()
    The effects that this light supports.
    boolean isOn()
    Queries the light state.
    void setBrightness​(int brightness)
    Sets the brightness of the light.
    void setState​(UpdateState state)
    Sets a state for the light.
    void turnOff()
    Turns the light off.
    void turnOn()
    Turns the light on.
  • Method Details

    • getId

      UUID getId()

      Returns the technical id of the light, as assigned by the Bridge. The id stays the same even if the light name is changed by the user.

      Specified by:
      getId in interface Device
      Returns:
      Id of the light.
    • getName

      String getName()
      Returns the name of the light, as set by the user.
      Specified by:
      getName in interface Device
      Returns:
      Name of the light.
    • turnOn

      void turnOn()
      Turns the light on.
    • turnOff

      void turnOff()
      Turns the light off.
    • isOn

      boolean isOn()
      Queries the light state.
      Returns:
      True if the light is on, false if it is off.
    • setBrightness

      void setBrightness​(int brightness)
      Sets the brightness of the light. If the light is off, does not turn it on, nor does 0 turn it off.
      Parameters:
      brightness - A value from 1 (minimum brightness) to 100 (maximum brightness).
    • setState

      void setState​(UpdateState state)
      Sets a state for the light.
      Parameters:
      state - A state to be set for this light.
    • getSupportedEffects

      Collection<EffectType> getSupportedEffects()
      The effects that this light supports. May be empty but never null.
      Returns:
      A collection of supported effect types.
    • getOwnerId

      UUID getOwnerId()

      Returns the technical id of the device that "owns" this light, as assigned by the Bridge.

      Returns:
      Id of the owner device of the light.