[core] Add YAML discovery, secret and zstd helpers

Report unresolved includes and load errors from include discovery, share
the !secret reference scan between bundle and other callers, let callers
register extra secret values for a dump and see which names it emitted,
swap secrets in the !extend, !remove and scalar !include representers,
record the remote sources packages fetch, and move zstd_module out of the
api wizard into esphome.helpers.
This commit is contained in:
J. Nick Koston
2026-10-07 13:06:40 -10:00
parent 7a1bfed81f
commit 5884ca4d32
12 changed files with 380 additions and 76 deletions
+3 -4
View File
@@ -212,10 +212,9 @@ async def yaml_config(request: pytest.FixtureRequest, unused_tcp_port: int) -> s
loop = asyncio.get_running_loop()
content = await loop.run_in_executor(None, read_file, fixture_path)
# Replace the port in the config if it contains api section
if "api:" in content:
# Add port configuration after api:
content = content.replace("api:", f"api:\n port: {unused_tcp_port}")
# Replace the port in the config if it contains an api section. Anchored to
# the start of a line so keys that merely end in "api:" are left alone.
content = re.sub(r"(?m)^api:", f"api:\n port: {unused_tcp_port}", content)
# Add debug build flags for integration tests to enable assertions
if "esphome:" in content and "build_flags:" not in content: