]> git.basschouten.com Git - openhab-addons.git/commitdiff
[lutron] Fix Pico buttons for non-LEAP bridges (#17204)
authorCody Cutrer <cody@cutrer.us>
Sun, 4 Aug 2024 20:10:33 +0000 (14:10 -0600)
committerGitHub <noreply@github.com>
Sun, 4 Aug 2024 20:10:33 +0000 (22:10 +0200)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/handler/PicoKeypadHandler.java

index 4f2cfd6bde67c47156f3147c3d73d54ce0f40c9b..c37e4ea8c59035abb6d4227666a6907775ffd0f0 100644 (file)
@@ -69,7 +69,9 @@ public class PicoKeypadHandler extends BaseKeypadHandler {
                 leapButtonMap = KeypadConfigPico.LEAPBUTTONS_3BRL;
                 break;
         }
-        leapButtonInverseMap = leapButtonMap.entrySet().stream()
-                .collect(Collectors.toMap(Entry::getValue, Entry::getKey));
+        if (getBridgeHandler() instanceof LeapBridgeHandler) {
+            leapButtonInverseMap = leapButtonMap.entrySet().stream()
+                    .collect(Collectors.toMap(Entry::getValue, Entry::getKey));
+        }
     }
 }