diff --git a/src/main/java/de/ctdo/bunti/model/BuntiDMXDevice.java b/src/main/java/de/ctdo/bunti/model/BuntiDMXDevice.java index 99c8859..73a9110 100644 --- a/src/main/java/de/ctdo/bunti/model/BuntiDMXDevice.java +++ b/src/main/java/de/ctdo/bunti/model/BuntiDMXDevice.java @@ -127,20 +127,16 @@ public abstract class BuntiDMXDevice extends BuntiDevice { public final boolean setValuesFromOptions(Map options) { for (Entry opt : options.entrySet()) { - - DMXChannel channel = dmxChannels.getChannelByName(opt.getKey()); - - if(channel != null) { - try { - int value = Integer.parseInt(opt.getValue().toString()); - - setChannelValueByName(channel.getName(), value); - - } catch (Exception e) { - return false; - } - } - } + try { + int value = Integer.parseInt(opt.getValue().toString()); + + if(!setChannelValueByName(opt.getKey(), value)) { + return false; + } + } catch (Exception e) { + return false; + } + } return true; }