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:
@@ -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])
|
||||
|
Reference in New Issue
Block a user