1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-22 13:12:22 +01:00

Merge remote-tracking branch 'upstream/dev' into integration

This commit is contained in:
J. Nick Koston
2025-09-19 22:44:16 -06:00
104 changed files with 1620 additions and 1005 deletions

View File

@@ -42,9 +42,9 @@ def config_path(request: pytest.FixtureRequest) -> Generator[None]:
if config_dir.exists():
# Set config_path to a dummy yaml file in the config directory
# This ensures CORE.config_dir points to the config directory
CORE.config_path = str(config_dir / "dummy.yaml")
CORE.config_path = config_dir / "dummy.yaml"
else:
CORE.config_path = str(Path(request.fspath).parent / "dummy.yaml")
CORE.config_path = Path(request.fspath).parent / "dummy.yaml"
yield
CORE.config_path = original_path
@@ -131,7 +131,7 @@ def generate_main() -> Generator[Callable[[str | Path], str]]:
"""Generates the C++ main.cpp from a given yaml file and returns it in string form."""
def generator(path: str | Path) -> str:
CORE.config_path = str(path)
CORE.config_path = Path(path)
CORE.config = read_config({})
generate_cpp_contents(CORE.config)
return CORE.cpp_main_section