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 class  State.Builder  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static State LONG_ALERT
    A state that causes light(s) to blink for 15 seconds.
    static State NO_ALERT
    A state that stops lights from blinking.
    static State SHORT_ALERT
    A state that causes a short blink to occur.
  • Method Summary

    Modifier and Type Method Description
    static StateBuilderSteps.InitialStep builder()  
    boolean equals​(java.lang.Object o)  
    AlertType getAlert()
    The latest alert command issued.
    java.lang.Integer getBri()  
    java.lang.Integer getCt()  
    java.lang.Integer getHue()  
    java.lang.Boolean getOn()  
    java.lang.Integer getSat()  
    java.lang.String getScene()
    The id of the scene that this state will activate.
    java.lang.Integer getTransitiontime()  
    java.util.List<java.lang.Float> getXy()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • SHORT_ALERT

      public static final State SHORT_ALERT
      A state that causes a short blink to occur.
    • LONG_ALERT

      public static final State LONG_ALERT
      A state that causes light(s) to blink for 15 seconds.
    • NO_ALERT

      public static final State 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 be null.
      Returns:
      Id of a scene, or null if this object was received from an actual Light object.
      Since:
      1.3.0
    • getAlert

      public AlertType getAlert()
      The latest alert command issued. Does not automatically reset to AlertType.NONE when the alert ends.
      Returns:
      Latest alert command issued.
      Since:
      2.1.0
    • builder

      public static StateBuilderSteps.InitialStep builder()
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object