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

Merge branch 'dev' into sha256_ota

This commit is contained in:
J. Nick Koston
2025-09-19 19:12:19 -05:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -194,7 +194,7 @@ async def to_code(config):
cg.add_define("CPPHTTPLIB_OPENSSL_SUPPORT") cg.add_define("CPPHTTPLIB_OPENSSL_SUPPORT")
elif path := config.get(CONF_CA_CERTIFICATE_PATH): elif path := config.get(CONF_CA_CERTIFICATE_PATH):
cg.add_define("CPPHTTPLIB_OPENSSL_SUPPORT") cg.add_define("CPPHTTPLIB_OPENSSL_SUPPORT")
cg.add(var.set_ca_path(path)) cg.add(var.set_ca_path(str(path)))
cg.add_build_flag("-lssl") cg.add_build_flag("-lssl")
cg.add_build_flag("-lcrypto") cg.add_build_flag("-lcrypto")

View File

@@ -1,4 +1,4 @@
import os from pathlib import Path
from typing import TypedDict from typing import TypedDict
import esphome.codegen as cg import esphome.codegen as cg
@@ -48,7 +48,7 @@ class ZephyrData(TypedDict):
bootloader: str bootloader: str
prj_conf: dict[str, tuple[PrjConfValueType, bool]] prj_conf: dict[str, tuple[PrjConfValueType, bool]]
overlay: str overlay: str
extra_build_files: dict[str, str] extra_build_files: dict[str, Path]
pm_static: list[Section] pm_static: list[Section]
user: dict[str, list[str]] user: dict[str, list[str]]
@@ -93,7 +93,7 @@ def zephyr_add_overlay(content):
zephyr_data()[KEY_OVERLAY] += content zephyr_data()[KEY_OVERLAY] += content
def add_extra_build_file(filename: str, path: str) -> bool: def add_extra_build_file(filename: str, path: Path) -> bool:
"""Add an extra build file to the project.""" """Add an extra build file to the project."""
extra_build_files = zephyr_data()[KEY_EXTRA_BUILD_FILES] extra_build_files = zephyr_data()[KEY_EXTRA_BUILD_FILES]
if filename not in extra_build_files: if filename not in extra_build_files:
@@ -102,7 +102,7 @@ def add_extra_build_file(filename: str, path: str) -> bool:
return False return False
def add_extra_script(stage: str, filename: str, path: str): def add_extra_script(stage: str, filename: str, path: Path) -> None:
"""Add an extra script to the project.""" """Add an extra script to the project."""
key = f"{stage}:{filename}" key = f"{stage}:{filename}"
if add_extra_build_file(filename, path): if add_extra_build_file(filename, path):
@@ -144,7 +144,7 @@ def zephyr_to_code(config):
add_extra_script( add_extra_script(
"pre", "pre",
"pre_build.py", "pre_build.py",
os.path.join(os.path.dirname(__file__), "pre_build.py.script"), Path(__file__).parent / "pre_build.py.script",
) )