public interface Light
| Modifier and Type | Method | Description |
|---|---|---|
String |
getName() |
Returns the name of the light, as set by the user.
|
State |
getState() |
Gets the state of the light -- or returns the cached state if caching
has been enabled with
Hue.setCaching(boolean). |
LightType |
getType() |
Returns info on the type of the light.
|
boolean |
isOn() |
Queries the light state -- or returns the cached state if caching
has been enabled with
Hue.setCaching(boolean). |
boolean |
isReachable() |
Queries the reachability of the light -- or returns the cached state if caching
has been enabled with
Hue.setCaching(boolean). |
void |
setBrightness(int brightness) |
Sets the brightness of the light.
|
void |
setState(State state) |
Sets a state for the light.
|
void |
turnOff() |
Turns the light off.
|
void |
turnOn() |
Turns the light on.
|
String getName()
void turnOn()
void turnOff()
boolean isOn()
Hue.setCaching(boolean).boolean isReachable()
Hue.setCaching(boolean).void setBrightness(int brightness)
0 turn it off.brightness - A value from 0 (minimum brightness) to 254 (maximum brightness).LightType getType()
void setState(State state)
state - A state to be set for this light.State getState()
Hue.setCaching(boolean).Copyright © 2020. All rights reserved.