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

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Cody Cutrer 2024-08-04 14:10:33 -06:00 committed by Ciprian Pascu
parent 3eff0108df
commit 8ecc36436f

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