platform: arduino: mqtt: make config message persist

This commit is contained in:
Torrie Fischer 2021-03-31 14:39:21 -07:00
parent 10bbcd6786
commit 439a456d1a

View File

@ -83,7 +83,7 @@ MQTTTelemetry::handleEventOnline(const InputEvent& evt)
char buf[1024];
serializeJson(configJson, buf, sizeof(buf));
Log.verbose("Publish %s %s", configTopic.c_str(), buf);
m_mqtt.publish(configTopic.c_str(), buf);
m_mqtt.publish(configTopic.c_str(), buf, true);
m_mqtt.subscribe(m_cmdTopic);
} else {
Log.warning("Could not connect to MQTT");