Fix NullPointerException (#14010)
Fixes #13961 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
4871d6dab1
commit
c5b68d0248
@ -344,10 +344,10 @@ public class ShellyChannelDefinitions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shelly 1/1PM and Plus 1/1PM Addon
|
// Shelly 1/1PM and Plus 1/1PM Addon
|
||||||
addChannel(thing, add,
|
if (profile.settings.extSwitch != null && profile.settings.extSwitch.input0 != null
|
||||||
profile.settings.extSwitch != null && profile.settings.extSwitch.input0 != null
|
&& idx == getInteger(profile.settings.extSwitch.input0.relayNum)) {
|
||||||
&& idx == getInteger(profile.settings.extSwitch.input0.relayNum),
|
addChannel(thing, add, true, CHGR_SENSOR, CHANNEL_ESENSOR_INPUT + (idx + 1));
|
||||||
CHGR_SENSOR, CHANNEL_ESENSOR_INPUT + (profile.settings.extSwitch.input0.relayNum + 1));
|
}
|
||||||
if (profile.status.extTemperature != null) {
|
if (profile.status.extTemperature != null) {
|
||||||
addChannel(thing, add, profile.status.extTemperature.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENSOR_TEMP1);
|
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);
|
addChannel(thing, add, profile.status.extTemperature.sensor2 != null, CHGR_SENSOR, CHANNEL_ESENSOR_TEMP2);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user