 #ifdef JSON
   char   ARILUX_MQTT_JSON_STATE_TOPIC[44];
   char   ARILUX_MQTT_JSON_COMMAND_TOPIC[44];
-#endif
-
-#if defined(RGBW) || defined (RGBWW)
-char   ARILUX_MQTT_WHITE_STATE_TOPIC[44];
-char   ARILUX_MQTT_WHITE_COMMAND_TOPIC[44];
+#else
+  char   ARILUX_MQTT_STATE_STATE_TOPIC[44];
+  char   ARILUX_MQTT_STATE_COMMAND_TOPIC[44];
+  char   ARILUX_MQTT_BRIGHTNESS_STATE_TOPIC[44];
+  char   ARILUX_MQTT_BRIGHTNESS_COMMAND_TOPIC[44];
+  char   ARILUX_MQTT_COLOR_STATE_TOPIC[44];
+  char   ARILUX_MQTT_COLOR_COMMAND_TOPIC[44];
+  #if defined(RGBW) || defined (RGBWW)
+    char   ARILUX_MQTT_WHITE_STATE_TOPIC[44];
+    char   ARILUX_MQTT_WHITE_COMMAND_TOPIC[44];
+  #endif
 #endif
 
 // MQTT buffer

      root["color"]["b"] = arilux.getBlueValue();
      root.printTo(outgoingJsonBuffer);
      publishToMQTT(ARILUX_MQTT_JSON_STATE_TOPIC, outgoingJsonBuffer);
    #endif
    cmd = ARILUX_CMD_NOT_DEFINED;
  };
}

void publishStateChange(void) {
  publishToMQTT(ARILUX_MQTT_STATE_STATE_TOPIC, (arilux.getState() ? MQTT_STATE_ON_PAYLOAD : MQTT_STATE_OFF_PAYLOAD));
}

void publishBrightnessChange(void) {
  snprintf(msgBuffer, sizeof(msgBuffer), "%d", arilux.getBrightness());
  publishToMQTT(ARILUX_MQTT_BRIGHTNESS_STATE_TOPIC, msgBuffer);
}

void publishColorChange(void) {
  snprintf(msgBuffer, sizeof(msgBuffer), "%d,%d,%d", arilux.getRedValue(), arilux.getGreenValue(), arilux.getBlueValue());
  publishToMQTT(ARILUX_MQTT_COLOR_STATE_TOPIC, msgBuffer);
}

void publishWhiteChange(void) {
  snprintf(msgBuffer, sizeof(msgBuffer), "%d,%d", arilux.getWhite1Value(), arilux.getWhite2Value());
  publishToMQTT(ARILUX_MQTT_WHITE_STATE_TOPIC, msgBuffer);
}

///////////////////////////////////////////////////////////////////////////
//  WiFi

char   MQTT_TOPIC_PREFIX[32];

// MQTT topics
char   ARILUX_MQTT_STATUS_TOPIC[44];
#ifdef HOME_ASSISTANT_MQTT_DISCOVERY
  char   HOME_ASSISTANT_MQTT_DISCOVERY_TOPIC[56];
