Skip to content

Commit

Permalink
Fixing issue smrtnt#18 where color was not being sent on MQTT state w…
Browse files Browse the repository at this point in the history
…hen in JSON mode
  • Loading branch information
alexschwantes committed Apr 21, 2017
1 parent 433d286 commit 80b7570
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Arilux_AL-LC0X.ino
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,10 @@ void handleCMD(void) {
root["brightness"] = arilux.getBrightness();
// root["transition"] =
root["white_value"] = arilux.getWhite1Value();
root["color"]["r"] = arilux.getRedValue();
root["color"]["g"] = arilux.getGreenValue();
root["color"]["b"] = arilux.getBlueValue();
JsonObject& color = root.createNestedObject("color");
color["r"] = arilux.getRedValue();
color["g"] = arilux.getGreenValue();
color["b"] = arilux.getBlueValue();
root.printTo(outgoingJsonBuffer);
publishToMQTT(ARILUX_MQTT_JSON_STATE_TOPIC, outgoingJsonBuffer);
};
Expand Down

0 comments on commit 80b7570

Please sign in to comment.