From 25e04658b045695b6b05579889e9630db02bc95f Mon Sep 17 00:00:00 2001 From: Achronite <10363609+Achronite@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:05:21 +0000 Subject: [PATCH] Only enable discovery if monitoring is also enabled #82 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index c0fc0ad..65e65db 100644 --- a/app.js +++ b/app.js @@ -116,7 +116,7 @@ client.on('connect',function(){ publishBoardState('discover', 0); // reset to 0 discovered devices // Enable Periodic MQTT discovery at 1 min, and then every 10 minutes - if (CONFIG.discovery_prefix) { + if (CONFIG.monitoring && CONFIG.discovery_prefix) { discovery = true; // Publish the parent 'board' discovery once on startup