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 UUIDgetId()Returns the technical id of the light, as assigned by the Bridge.StringgetName()Returns the name of the light, as set by the user.Collection<EffectType>getSupportedEffects()The effects that this light supports.booleanisOn()Queries the light state.voidsetBrightness(int brightness)Sets the brightness of the light.voidsetState(UpdateState state)Sets a state for the light.voidturnOff()Turns the light off.voidturnOn()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.
-
getName
String getName()Returns the name of the light, as set by the user. -
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 does0turn it off.- Parameters:
brightness- A value from1(minimum brightness) to100(maximum brightness).
-
setState
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.
-