diff --git a/src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java b/src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java index ca04074f..c7dd630a 100644 --- a/src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java +++ b/src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java @@ -41,10 +41,10 @@ public void setColor(String color) { public String getBody() { String theBody = ""; - if(level != null && level != "") { + if(level != null && !"".equals(level)) { theBody = "{\"level\":" + level + "}"; } - else if(color != null && color != "") { + else if(color != null && !"".equals(color)) { theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}";