Skip to content

Commit

Permalink
Fix NullPointerExceptions (openhab#17180)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur authored Jul 29, 2024
1 parent f42fd62 commit e6fa6a4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public boolean inButtonMode(int idx) {
} else if (isDimmer) {
if (settings.dimmers != null) {
ShellySettingsDimmer dimmer = settings.dimmers.get(0);
btnType = dimmer.btnType;
btnType = getString(dimmer.btnType);
}
} else if (settings.relays != null) {
if (numRelays == 1) {
Expand All @@ -349,7 +349,7 @@ public boolean inButtonMode(int idx) {
}
} else if (isRGBW2 && (settings.lights != null) && (idx < settings.lights.size())) {
ShellySettingsRgbwLight light = settings.lights.get(idx);
btnType = light.btnType;
btnType = getString(light.btnType);
}

return btnType.equalsIgnoreCase(SHELLY_BTNT_MOMENTARY) || btnType.equalsIgnoreCase(SHELLY_BTNT_MOM_ON_RELEASE)
Expand Down

0 comments on commit e6fa6a4

Please sign in to comment.