Update request_handlers.h
This commit is contained in:
parent
5b76af1424
commit
2806bb0910
1 changed files with 4 additions and 3 deletions
|
@ -1049,9 +1049,10 @@ void checkForRequests() {
|
||||||
unsigned int msg_len = measureJson(json) + 1;
|
unsigned int msg_len = measureJson(json) + 1;
|
||||||
char buffer[msg_len];
|
char buffer[msg_len];
|
||||||
serializeJson(json, buffer, sizeof(buffer));
|
serializeJson(json, buffer, sizeof(buffer));
|
||||||
mqtt->beginPublish(String("homeassistant/light/" + String(HOSTNAME) + "/config").c_str(), msg_len, true);
|
DBG_OUTPUT_PORT.println(buffer);
|
||||||
mqtt->write((const uint8_t*)buffer, msg_len);
|
mqtt_client.beginPublish(String("homeassistant/light/" + String(HOSTNAME) + "/config").c_str(), msg_len-1, true);
|
||||||
mqtt->endPublish();
|
mqtt_client.write((const uint8_t*)buffer, msg_len-1);
|
||||||
|
mqtt_client.endPublish();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue