[lutron] Fix Pico buttons for non-LEAP bridges (#17204)

Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
Cody Cutrer 2024-08-04 14:10:33 -06:00 committed by Jacob Laursen
parent 353315537f
commit dd401fce12

View 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));
}
}
}