diff --git a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java index f1b3e3a77ea3..7e8f335b2f4b 100644 --- a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java +++ b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java @@ -126,7 +126,10 @@ public ShellyDeviceProfile initialize(String thingType, String jsonIn) throws Sh initFromThingType(thingType); String json = jsonIn; - if (json.contains("\"ext_temperature\":{\"0\":[{")) { + // It is not guaranteed, that the array entries are in order. Check all + // possible variants. See openhab#15514. + if (json.contains("\"ext_temperature\":{\"0\":[{") || json.contains("\"ext_temperature\":{\"1\":[{") + || json.contains("\"ext_temperature\":{\"2\":[{")) { // Shelly UNI uses ext_temperature array, reformat to avoid GSON exception json = json.replace("ext_temperature", "ext_temperature_array"); }