Skip to content

Commit

Permalink
Fix NullPointerException
Browse files Browse the repository at this point in the history
Fixes #13961

Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Dec 18, 2022
1 parent 4871d6d commit 5370f5f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ public static Map<String, Channel> createRelayChannels(final Thing thing, final
}

// Shelly 1/1PM and Plus 1/1PM Addon
addChannel(thing, add,
profile.settings.extSwitch != null && profile.settings.extSwitch.input0 != null
&& idx == getInteger(profile.settings.extSwitch.input0.relayNum),
CHGR_SENSOR, CHANNEL_ESENSOR_INPUT + (profile.settings.extSwitch.input0.relayNum + 1));
if (profile.settings.extSwitch != null && profile.settings.extSwitch.input0 != null
&& idx == getInteger(profile.settings.extSwitch.input0.relayNum)) {
addChannel(thing, add, true, CHGR_SENSOR, CHANNEL_ESENSOR_INPUT + (idx + 1));
}
if (profile.status.extTemperature != null) {
addChannel(thing, add, profile.status.extTemperature.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENSOR_TEMP1);
addChannel(thing, add, profile.status.extTemperature.sensor2 != null, CHGR_SENSOR, CHANNEL_ESENSOR_TEMP2);
Expand Down

0 comments on commit 5370f5f

Please sign in to comment.