1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-16 08:43:45 +01:00

Do not build mDNS when mDNS is disabled via yaml (#6979)

This commit is contained in:
Markus
2024-06-25 10:05:37 +02:00
committed by GitHub
parent 8a25bedaf9
commit c9a0daf4b6
8 changed files with 19 additions and 10 deletions

View File

@@ -74,6 +74,9 @@ def mdns_service(
@coroutine_with_priority(55.0)
async def to_code(config):
if config[CONF_DISABLED] is True:
return
if CORE.using_arduino:
if CORE.is_esp32:
cg.add_library("ESPmDNS", None)
@@ -92,9 +95,6 @@ async def to_code(config):
path="components/mdns",
)
if config[CONF_DISABLED]:
return
cg.add_define("USE_MDNS")
var = cg.new_Pvariable(config[CONF_ID])