public interface Room
| Modifier and Type | Method | Description |
|---|---|---|
Optional<Light> |
getLightByName(String lightName) |
Returns one light, if found by the given name.
|
Collection<Light> |
getLights() |
Returns all the lights that have been assigned to this group.
|
String |
getName() |
Returns the name of the room or zone, as set by the user.
|
Optional<Scene> |
getSceneByName(String sceneName) |
Returns one scene, if found by the given name.
|
Collection<Scene> |
getScenes() |
Returns the scenes that belong to this group.
|
GroupType |
getType() |
Returns the type of this group of lights, whether it is a room, a zone, or something else.
|
boolean |
isAllOn() |
Queries the state of the group.
|
boolean |
isAnyOn() |
Queries the state of the group of lights.
|
void |
setBrightness(int brightness) |
Sets the brightness of the group.
|
void |
setState(State state) |
Sets a state for the group.
|
String getName()
Collection<Light> getLights()
Optional<Light> getLightByName(String lightName)
lightName - Name of a light in this group.boolean isAnyOn()
boolean isAllOn()
void setState(State state)
state - A state to be set for this group.void setBrightness(int brightness)
0 turn them off.brightness - A value from 0 (minimum brightness) to 254 (maximum brightness).GroupType getType()
Collection<Scene> getScenes()
Optional<Scene> getSceneByName(String sceneName)
sceneName - Name of the scene, e.g. "Tropical twilight" or "Concentrate".Copyright © 2020. All rights reserved.