potential fix #391 MQTT avail and producing info inconsistent compared to web GUI

This commit is contained in:
lumapu 2022-11-05 22:21:22 +01:00
parent 1620b633d8
commit c467eead6b

View file

@ -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;
}