Without MQTT no publish

This commit is contained in:
Ollo 2021-12-16 20:24:51 +01:00
parent 128d5a0b3b
commit 2b930a6902

View File

@ -381,14 +381,14 @@ void loopHandler()
} }
/* Clean cycles buttons */ /* Clean cycles buttons */
if (mButtonPressed <= BUTTON_MIN_ACTION_CYCLE) { if ((!mConnectedNonMQTT) && (mButtonPressed <= BUTTON_MIN_ACTION_CYCLE)) {
buttonNode.setProperty(NODE_BUTTON).send("0"); buttonNode.setProperty(NODE_BUTTON).send("0");
} }
lastRead = millis(); lastRead = millis();
} }
/* if the user sees something via the LEDs, inform MQTT, too */ /* if the user sees something via the LEDs, inform MQTT, too */
if (mButtonPressed > BUTTON_MIN_ACTION_CYCLE) { if ((!mConnectedNonMQTT) && (mButtonPressed > BUTTON_MIN_ACTION_CYCLE)) {
buttonNode.setProperty(NODE_BUTTON).send(String(mButtonPressed)); buttonNode.setProperty(NODE_BUTTON).send(String(mButtonPressed));
} }