Interface Switch

All Superinterfaces:
Sensor

public interface Switch
extends Sensor
Any switch with one or more buttons, such as a Philips Hue dimmer switch or a Philips Hue Tap switch.
  • Method Details

    • getButtons

      java.util.List<Button> getButtons()
      Lists the buttons of this switch.
      Returns:
      A list of buttons on this switch.
    • getLatestEvent

      SwitchEvent getLatestEvent()
      The latest event of this switch.
      Returns:
      A SwitchEvent describing the most recent button press. Some switches, such as the Philips Hue Tap, only report the initial button press event. Some other switches, such as the Philips Hue dimmer switch, report more events, including the initial button press, another event if the button is being held down for long enough, and a third event describing the release of the button. See ButtonEvent.ButtonEventType for a description of the supported events.