diff --git a/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication/AmplifierModel.java b/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication/AmplifierModel.java index 1c030f19518bf..15bd88049eab2 100644 --- a/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication/AmplifierModel.java +++ b/bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication/AmplifierModel.java @@ -270,7 +270,7 @@ private static MonopriceAudioZoneDTO getMonopriceZoneData(String newZoneData) { public String getZoneIdFromZoneName(String zoneName) { for (String zoneId : zoneIdMap.keySet()) { - if (zoneIdMap.get(zoneId).equals(zoneName)) { + if (zoneName.equals(zoneIdMap.get(zoneId))) { return zoneId; } } @@ -278,12 +278,8 @@ public String getZoneIdFromZoneName(String zoneName) { } public String getZoneName(String zoneId) { - String zoneName = zoneIdMap.get(zoneId); - if (zoneName != null) { - return zoneName; - } else { - return ""; - } + final String zoneName = zoneIdMap.get(zoneId); + return zoneName != null ? zoneName : ""; } public String getCmdPrefix() {