     startFade = true;
     inFade = false; // Kill the current fade
 
-    if (arilux.getState() != boolState) {
-      arilux.setState(boolState);
-      publishStateChange();
-    }
-
-    if(boolState) {
-      if (arilux.getBrightness() != brightness) {
-        arilux.setBrightness(brightness);
-        publishBrightnessChange();
+    if (root.containsKey("flash")) {
+      flashLength = (int)root["flash"] * 1000;
+
+      if (root.containsKey("brightness")) {
+        flashBrightness = root["brightness"];
+      } else {
+        flashBrightness = arilux.getBrightness();
       }
 
-      if (arilux.getWhite1Value() != white_value || arilux.getWhite2Value() != white_value) {
-        arilux.setWhite(white_value, white_value);
-        publishWhiteChange();
+      if (root.containsKey("color")) {
+        flashRed = root["color"]["r"];
+        flashGreen = root["color"]["g"];
+        flashBlue = root["color"]["b"];
+      } else {
+        flashRed = arilux.getRedValue();
+        flashGreen = arilux.getGreenValue();
+        flashBlue = arilux.getBlueValue();
       }
 
-      if (arilux.getRedValue() != red_color || arilux.getGreenValue() != green_color || arilux.getBlueValue() != blue_color) {
-        arilux.setColor(red_color, green_color, blue_color);
-        publishColorChange();
+      flashRed = map(flashRed, 0, 255, 0, flashBrightness);
+      flashGreen = map(flashGreen, 0, 255, 0, flashBrightness);
+      flashBlue = map(flashBlue, 0, 255, 0, flashBrightness);
+
+      flash = true;
+      startFlash = true;
+    } else { // Not flashing
+      flash = false;
+      if (arilux.getState() != boolState) {
+        arilux.setState(boolState);
+        publishStateChange();
+      }
+
+      if(boolState) {
+        if (arilux.getBrightness() != brightness) {
+          arilux.setBrightness(brightness);
+          publishBrightnessChange();
+        }
+
+        if (arilux.getWhite1Value() != white_value || arilux.getWhite2Value() != white_value) {
+          arilux.setWhite(white_value, white_value);
+          publishWhiteChange();
+        }
+
+        if (arilux.getRedValue() != red_color || arilux.getGreenValue() != green_color || arilux.getBlueValue() != blue_color) {
+          arilux.setColor(red_color, green_color, blue_color);
+          publishColorChange();
+        }
       }
     }
   } else if (String(ARILUX_MQTT_STATE_COMMAND_TOPIC).equals(p_topic)) {

        DEBUG_PRINTLN(MQTT_PASS);
        DEBUG_PRINT(F("Broker: "));
        DEBUG_PRINTLN(MQTT_SERVER);
      }

      subscribeToMQTTTopic(ARILUX_MQTT_STATE_COMMAND_TOPIC);

  ArduinoOTA.setHostname(MQTT_CLIENT_ID);
  ArduinoOTA.onStart([]() {
    DEBUG_PRINTLN("OTA Beginning!");
    flashSuccess(true);
  });
  ArduinoOTA.onError([](ota_error_t error) {
    DEBUG_PRINT("ArduinoOTA Error[");
