Browse Source

Set MQTT will topic after /get suffix initialization #2106 (#2115)

mcspr-patch-1
Tomas Bara 4 years ago
committed by Max Prokhorov
parent
commit
c196fa2542
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      code/espurna/mqtt.ino

+ 5
- 2
code/espurna/mqtt.ino View File

@ -328,8 +328,6 @@ void _mqttConfigure() {
if (topic.indexOf("#") == -1) topic.concat("/#");
_mqttApplySetting(_mqtt_topic, topic);
_mqttApplyTopic(_mqtt_will, MQTT_TOPIC_STATUS);
}
// Getter and setter
@ -365,6 +363,11 @@ void _mqttConfigure() {
_mqttApplySetting(_mqtt_clientid, id);
}
// MQTT WILL
{
_mqttApplyTopic(_mqtt_will, MQTT_TOPIC_STATUS);
}
// MQTT JSON
{
_mqttApplySetting(_mqtt_use_json, getSetting("mqttUseJson", MQTT_USE_JSON).toInt() == 1);


Loading…
Cancel
Save