Package io.github.zeroone3010.yahueapi
Class State
java.lang.Object
io.github.zeroone3010.yahueapi.State
public final class State
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classState.Builder -
Field Summary
Fields Modifier and Type Field Description static StateLONG_ALERTA state that causes light(s) to blink for 15 seconds.static StateNO_ALERTA state that stops lights from blinking.static StateSHORT_ALERTA state that causes a short blink to occur. -
Method Summary
Modifier and Type Method Description static StateBuilderSteps.InitialStepbuilder()booleanequals(java.lang.Object o)AlertTypegetAlert()The latest alert command issued.java.lang.IntegergetBri()java.lang.IntegergetCt()java.lang.IntegergetHue()java.lang.BooleangetOn()java.lang.IntegergetSat()java.lang.StringgetScene()The id of the scene that this state will activate.java.lang.IntegergetTransitiontime()java.util.List<java.lang.Float>getXy()inthashCode()java.lang.StringtoString()
-
Field Details
-
SHORT_ALERT
A state that causes a short blink to occur. -
LONG_ALERT
A state that causes light(s) to blink for 15 seconds. -
NO_ALERT
A state that stops lights from blinking.
-
-
Method Details
-
getOn
public java.lang.Boolean getOn() -
getBri
public java.lang.Integer getBri() -
getXy
public java.util.List<java.lang.Float> getXy() -
getHue
public java.lang.Integer getHue() -
getSat
public java.lang.Integer getSat() -
getCt
public java.lang.Integer getCt() -
getTransitiontime
public java.lang.Integer getTransitiontime() -
getScene
public java.lang.String getScene()The id of the scene that this state will activate. Note that the API does not populate this value when you get the state of a light or a room. This means that unless you created this State object manually, this value will always benull.- Returns:
- Id of a scene, or
nullif this object was received from an actualLightobject. - Since:
- 1.3.0
-
getAlert
The latest alert command issued. Does not automatically reset toAlertType.NONEwhen the alert ends.- Returns:
- Latest alert command issued.
- Since:
- 2.1.0
-
builder
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-