]> git.basschouten.com Git - openhab-addons.git/commit
[homematic] Remove double press events and improve long press events for button trigg...
authormaniac103 <dannybaumann@web.de>
Sat, 18 Sep 2021 12:32:40 +0000 (14:32 +0200)
committerGitHub <noreply@github.com>
Sat, 18 Sep 2021 12:32:40 +0000 (14:32 +0200)
commit88975dcd134f3e261d84e16e16ec72eb47a6d350
treedbe2b3b4680ae25adb77677948eb38f539c900e6
parentcbe537a43bd611ef6dc5eb6d83da764578316252
[homematic] Remove double press events and improve long press events for button trigger (#11186)

HM devices provide not only 'long press' events, but also 'long
press continued' (sent in configured long press interval) and 'long
press released' events. So far, those events were swallowed in the
button datapoint handler.
Improve the situation by forwarding those events to the button trigger
channel, making them usable in e.g. rules that react on button long
presses.

A double press timeout of 2 seconds is too long and disturbs single
press processing. Additionally, for double press processing to be
useful, the first press would need to be swallowed until double press
timeout elapses, which is not what happened here: the first PRESS was
sent out as SINGLE_PRESS event, making it impossible to meaningfully
distinguish the 'single press' and 'double press' events within rules.

If needed, double press handling can be implemented equally well within
a rule.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
bundles/org.openhab.binding.homematic/README.md
bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/virtual/ButtonVirtualDatapointHandler.java
bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/handler/HomematicThingHandler.java
bundles/org.openhab.binding.homematic/src/test/java/org/openhab/binding/homematic/internal/communicator/virtual/ButtonDatapointTest.java