From b92ae73713850d2f8f9d1418e9ac7321e7ea6c79 Mon Sep 17 00:00:00 2001 From: Fabian Wolter Date: Mon, 25 Sep 2023 14:32:19 +0200 Subject: [PATCH] [lcn] Fix processing of logic function "all fulfilled" status message Signed-off-by: Fabian Wolter --- .../lcn/internal/subhandler/LcnModuleLogicSubHandler.java | 1 + .../internal/subhandler/LcnModuleLogicSubHandlerTest.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandler.java b/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandler.java index 8f48646caadda..75dacf05b5afe 100644 --- a/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandler.java +++ b/bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandler.java @@ -101,6 +101,7 @@ public void handleStatusMessage(Matcher matcher) { state = LcnDefs.LogicOpStatus.OR; break; case "050": + case "200": // not documented, but seen in the field and confirmed by the LCN hotline state = LcnDefs.LogicOpStatus.AND; break; default: diff --git a/bundles/org.openhab.binding.lcn/src/test/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandlerTest.java b/bundles/org.openhab.binding.lcn/src/test/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandlerTest.java index 5cf7cb41dae86..755d56b909ec8 100644 --- a/bundles/org.openhab.binding.lcn/src/test/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandlerTest.java +++ b/bundles/org.openhab.binding.lcn/src/test/java/org/openhab/binding/lcn/internal/subhandler/LcnModuleLogicSubHandlerTest.java @@ -106,4 +106,11 @@ public void testStatusSingleLogic3And() { verify(handler).updateChannel(LcnChannelGroup.LOGIC, "3", AND); verify(handler).updateChannel(any(), any(), any()); } + + @Test + public void testStatusSingleLogic3And200() { + tryParseAllHandlers("=M000005S3200"); + verify(handler).updateChannel(LcnChannelGroup.LOGIC, "3", AND); + verify(handler).updateChannel(any(), any(), any()); + } }