Skip to content

Commit 6ab5f0d

Browse files
committed
made IP retrained in MQTT
1 parent 7650842 commit 6ab5f0d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ bool connectMQTT()
851851
{
852852
if (mqttclient.connect(mqttClientId, _settings.data.mqttUser, _settings.data.mqttPassword, (topic + "/Alive").c_str(), 0, true, "false", true))
853853
{
854-
mqttclient.publish((topic + String("/IP")).c_str(), String(WiFi.localIP().toString()).c_str());
854+
mqttclient.publish((topic + String("/IP")).c_str(), String(WiFi.localIP().toString()).c_str(), true);
855855
mqttclient.publish((topic + String("/Alive")).c_str(), "true", true); // LWT online message must be retained!
856856

857857
if (strlen(_settings.data.mqttTriggerPath) > 0)

0 commit comments

Comments
 (0)