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();