         realBlue = arilux.getBlueValue();
       }
 
-      startFade = true;
-      inFade = false; // Kill the current fade
 
       if (root.containsKey("flash")) {
+        startFade = true;
+        inFade = false; // Kill the current fade
         flashLength = (int)root["flash"] * 1000;
 
         if (root.containsKey("brightness")) {

      }

      if (root.containsKey("color")) {
        int red_color = root["color"]["r"];
        int green_color = root["color"]["g"];
        int blue_color = root["color"]["b"];

          if (strcmp(root["state"], "ON") == 0) {
            arilux.turnOn();
          } else if (strcmp(root["state"], "OFF") == 0) {
            startFade = false;
            startFlash = false;
            inFade = false; // Kill the current fade
            arilux.turnOff();
          }
        }
