Class ButtonEvent

java.lang.Object
io.github.zeroone3010.yahueapi.ButtonEvent

public final class ButtonEvent
extends Object

This class describes an event of a single button of a switch. Depending on the device in question, a button may only report when it is pushed down. Other kinds of devices will report the release of the button separately, and still some other devices may report whether the button was held down for a short period of time or a long period of time before it was released.

Every button event has a numeric event code, an integer. In case the device does not introduce all of its events to the Bridge, this library will not be able to know about those events and will report them as the UNKNOWN type. However, even in those cases one will be able to tell different UNKNOWN events apart by examining the eventCode.