Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2026-03-15 20:27:07 -10:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent b7960ee19b
commit 968c0c2452
+7 -4
View File
@@ -36,9 +36,9 @@ from esphome.const import (
CONF_VALUE,
KEY_CORE,
KEY_FRAMEWORK_VERSION,
KEY_NATIVE_IDF,
Platform,
PlatformFramework,
)
from esphome.core import (
CORE,
CoroPriority,
@@ -629,9 +629,12 @@ def _filter_source_files() -> list[str]:
elif CORE.is_esp32:
from esphome.components.esp32 import idf_version
ver = idf_version()
if cv.Version(5, 4, 2) <= ver < cv.Version(6, 0, 0):
excluded.append("esp_eth_phy_jl1101.c")
# Mirror C preprocessor logic: only exclude for PlatformIO (non-native IDF)
is_native_idf = CORE.data.get(KEY_NATIVE_IDF, False)
if not is_native_idf:
ver = idf_version()
if cv.Version(5, 4, 2) <= ver < cv.Version(6, 0, 0):
excluded.append("esp_eth_phy_jl1101.c")
return excluded