From eec373e2ae29f3bf07279f08066e9954e1f244e0 Mon Sep 17 00:00:00 2001 From: proddy Date: Fri, 19 Dec 2025 16:35:55 +0100 Subject: [PATCH] publish ha only if ha is enabled --- src/web/WebCustomEntityService.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index ab74f0a0d..482b021b3 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -383,12 +383,6 @@ void WebCustomEntityService::publish() { return; } - if (Mqtt::publish_single()) { - for (CustomEntityItem & entityItem : *customEntityItems_) { - publish_single(entityItem); - } - } - JsonDocument doc; JsonObject output = doc.to(); bool ha_created = ha_configdone_; @@ -399,7 +393,7 @@ void WebCustomEntityService::publish() { } render_value(output, entityItem); // create HA config - if (!ha_configdone_) { + if (Mqtt::ha_enabled() && !ha_configdone_) { JsonDocument config; config["~"] = Mqtt::base();