From c467eead6b79a6e8570da37898033488bb5eaa20 Mon Sep 17 00:00:00 2001 From: lumapu Date: Sat, 5 Nov 2022 22:21:22 +0100 Subject: [PATCH] potential fix #391 MQTT avail and producing info inconsistent compared to web GUI --- tools/esp8266/app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index 5f96da0c..ca6f5ba1 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -600,7 +600,7 @@ void app::sendMqtt(void) { uint8_t status = MQTT_STATUS_AVAIL_PROD; if (!iv->isAvailable(mUtcTimestamp, rec)) status = MQTT_STATUS_NOT_AVAIL_NOT_PROD; - if (!iv->isProducing(mUtcTimestamp, rec)) { + else if (!iv->isProducing(mUtcTimestamp, rec)) { if (MQTT_STATUS_AVAIL_PROD == status) status = MQTT_STATUS_AVAIL_NOT_PROD; }