From ba5e995fc1d8a6f6c1cfd956499991a8757845b8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 21 Sep 2025 15:40:47 -0600 Subject: [PATCH] preen --- esphome/components/sha256/__init__.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/esphome/components/sha256/__init__.py b/esphome/components/sha256/__init__.py index 91d4929a4f..f07157416d 100644 --- a/esphome/components/sha256/__init__.py +++ b/esphome/components/sha256/__init__.py @@ -13,12 +13,10 @@ CONFIG_SCHEMA = cv.Schema({}) async def to_code(config: ConfigType) -> None: # Add OpenSSL library for host platform - if CORE.is_host: - if IS_MACOS: - # macOS needs special handling for Homebrew OpenSSL - cg.add_build_flag("-I/opt/homebrew/opt/openssl/include") - cg.add_build_flag("-L/opt/homebrew/opt/openssl/lib") - cg.add_build_flag("-lcrypto") - else: - # Linux and other Unix systems usually have OpenSSL in standard paths - cg.add_build_flag("-lcrypto") + if not CORE.is_host: + return + if IS_MACOS: + # macOS needs special handling for Homebrew OpenSSL + cg.add_build_flag("-I/opt/homebrew/opt/openssl/include") + cg.add_build_flag("-L/opt/homebrew/opt/openssl/lib") + cg.add_build_flag("-lcrypto")