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;
|
||||
char buffer[msg_len];
|
||||
serializeJson(json, buffer, sizeof(buffer));
|
||||
mqtt->beginPublish(String("homeassistant/light/" + String(HOSTNAME) + "/config").c_str(), msg_len, true);
|
||||
mqtt->write((const uint8_t*)buffer, msg_len);
|
||||
mqtt->endPublish();
|
||||
DBG_OUTPUT_PORT.println(buffer);
|
||||
mqtt_client.beginPublish(String("homeassistant/light/" + String(HOSTNAME) + "/config").c_str(), msg_len-1, true);
|
||||
mqtt_client.write((const uint8_t*)buffer, msg_len-1);
|
||||
mqtt_client.endPublish();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue