1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-10 22:03:46 +01:00

[mdns][openthread] Use std::array for mdns services and remove unnecessary copy

This commit is contained in:
J. Nick Koston
2025-10-01 22:25:11 +02:00
parent a9dc0628c4
commit 21d7dc2b9b

View File

@@ -95,15 +95,15 @@ async def to_code(config):
service_count = 0
# Check if API component is enabled (it may create a service at runtime)
if cg.is_defined("USE_API"):
if "api" in CORE.config:
service_count += 1
# Check for prometheus
if cg.is_defined("USE_PROMETHEUS"):
if "prometheus" in CORE.config:
service_count += 1
# Check for web_server
if cg.is_defined("USE_WEBSERVER"):
if "web_server" in CORE.config:
service_count += 1
# Count extra services from config