]> git.basschouten.com Git - openhab-addons.git/commit
[homematic] Fix duplication of LONG_REPEATED events for HM devices (#15906)
authormaniac103 <dannybaumann@web.de>
Sat, 18 Nov 2023 19:38:55 +0000 (20:38 +0100)
committerGitHub <noreply@github.com>
Sat, 18 Nov 2023 19:38:55 +0000 (20:38 +0100)
commit87ae9e2a37eccb68ee9c827fa1f60c3a8b92dc4b
tree287dbf32dcd34deae9dab8a2bebdf9e01dc57877
parent01ab38ee13489da942a05c06999c16b5b3589bf8
[homematic] Fix duplication of LONG_REPEATED events for HM devices (#15906)

Depending on device configuration and used central [1], HM devices may
indicate long press repetition either by a single PRESS_CONT event or by
a PRESS_CONT + PRESS_LONG combination. In the latter case, make sure to
not generate a LONG_REPEATED trigger channel event for both PRESS_CONT
and PRESS_LONG, but instead keep LONG_REPEATED generation to the
PRESS_CONT handling.

[1] I'm not sure what a real CCU is doing, but for Homegear, a
    configured long press timeout of less than 1s generates only
    PRESS_CONT, while a timeout of more than 1s generates
    PRESS_CONT + PRESS_LONG ... see [2].
[2] https://github.com/Homegear/Homegear-HomeMaticBidCoS/blob/master/src/BidCoSPeer.cpp#L1711-L1716

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