Package io.github.zeroone3010.yahueapi
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 Summary
Modifier and Type Method Description java.util.List<Button>getButtons()Lists the buttons of this switch.SwitchEventgetLatestEvent()The latest event of this switch.Methods inherited from interface io.github.zeroone3010.yahueapi.Sensor
getId, getLastUpdated, getName, getProductName, getType
-
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
SwitchEventdescribing 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. SeeButtonEvent.ButtonEventTypefor a description of the supported events.
-