Merge pull request #152 from YeonV/patch-1

Fixed MQTT color response
This commit is contained in:
Aircoookie 2019-04-15 22:37:41 +02:00 committed by GitHub
commit 0bbff627e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ void publishMqtt()
strcat(subuf, "/g"); strcat(subuf, "/g");
mqtt->publish(subuf, 0, true, s); mqtt->publish(subuf, 0, true, s);
sprintf(s, "#%X", col[3]*16777216 + col[0]*65536 + col[1]*256 + col[2]); sprintf(s, "#%06X", col[3]*16777216 + col[0]*65536 + col[1]*256 + col[2]);
strcpy(subuf, mqttDeviceTopic); strcpy(subuf, mqttDeviceTopic);
strcat(subuf, "/c"); strcat(subuf, "/c");
mqtt->publish(subuf, 0, true, s); mqtt->publish(subuf, 0, true, s);