|
|
@@ -86,9 +86,9 @@ void RgbPacketFormatter::parsePacket(const uint8_t* packet, JsonObject& result)
|
|
|
result["device_type"] = "rgb";
|
|
|
|
|
|
if (command == RGB_ON) {
|
|
|
- result["status"] = "on";
|
|
|
+ result["state"] = "ON";
|
|
|
} else if (command == RGB_OFF) {
|
|
|
- result["status"] = "off";
|
|
|
+ result["state"] = "OFF";
|
|
|
} else if (command == 0) {
|
|
|
uint16_t remappedColor = rescale<uint16_t, uint16_t>(packet[RGB_COLOR_INDEX], 360.0, 255.0);
|
|
|
remappedColor = (remappedColor + 320) % 360;
|