diff --git a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/provider/ShellyChannelDefinitions.java b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/provider/ShellyChannelDefinitions.java index 0d27bae8eb24e..999a502a73023 100644 --- a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/provider/ShellyChannelDefinitions.java +++ b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/provider/ShellyChannelDefinitions.java @@ -344,10 +344,10 @@ public static Map createRelayChannels(final Thing thing, final } // Shelly 1/1PM and Plus 1/1PM Addon + int relayNum = getInteger(profile.settings.extSwitch.input0.relayNum); 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)); + profile.settings.extSwitch != null && profile.settings.extSwitch.input0 != null && idx == relayNum, + CHGR_SENSOR, CHANNEL_ESENSOR_INPUT + (relayNum + 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);