From 314db26f54f5036aaa8866a7137409d681f4e91d Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Sat, 25 Aug 2018 17:46:34 -0300 Subject: [PATCH] Added command PUBLISH2 to send retained MQTT msg Solves #2861, #2851 and #3428 --- sonoff/xdrv_01_mqtt.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_01_mqtt.ino b/sonoff/xdrv_01_mqtt.ino index b87dafdc0..dcbbc2250 100644 --- a/sonoff/xdrv_01_mqtt.ino +++ b/sonoff/xdrv_01_mqtt.ino @@ -659,7 +659,7 @@ bool MqttCommand() } else { mqtt_data[0] = '\0'; } - MqttPublishDirect(stemp1, false); + MqttPublishDirect(stemp1, (index==2) ); // snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_JSON_DONE); mqtt_data[0] = '\0'; }