diff --git a/lib/esp_framework/src/Led.cpp b/lib/esp_framework/src/Led.cpp index bfb9137..526c11b 100644 --- a/lib/esp_framework/src/Led.cpp +++ b/lib/esp_framework/src/Led.cpp @@ -45,7 +45,7 @@ void Led::loop() } } #ifndef DISABLE_MQTT - else if (!Mqtt::mqttClient.connected()) + else if (globalConfig.mqtt.port != 0 && !Mqtt::mqttClient.connected()) { if (Led::ledType != 1) { diff --git a/src/DC1.cpp b/src/DC1.cpp index 337d640..0dc065f 100644 --- a/src/DC1.cpp +++ b/src/DC1.cpp @@ -62,7 +62,7 @@ void DC1::init() bool DC1::moduleLed() { - if (WiFi.status() == WL_CONNECTED && Mqtt::mqttClient.connected()) + if (WiFi.status() == WL_CONNECTED && (globalConfig.mqtt.port ==0 || Mqtt::mqttClient.connected())) { if (config.wifi_led == 0) {