Interface LightController

  • All Implemented Interfaces:

    
    public interface LightController
    
                        

    Interface for controlling a light. This is used by KobotLight to abstract the actual hardware implementation.

    The exec, flash, and transition functions are specifically called out since they will usually involve some background tasking to work with this system.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • exec

         Unit exec(String effect)

        Execute an effect in some sort of completable manner. Note this must be cancellable by any subsequent commands.

      • flash

         Unit flash(Integer flash)

        Flash the light (on/off) using this period (seconds). Continues flashing until another command is received.

        NOTE HA is only currently sending either 10 or 2 to signal fast/slow.

      • transition

         Unit transition(LightCommand command)

        Transition from the current state to a new state. Because this can include color and brightness changes, the whole parsed command is necessary to complete this function.