This commit is contained in:
Jonathan Swoboda
2025-12-22 11:19:56 -05:00
parent 63b8fa004c
commit c5ac62676c
2 changed files with 4 additions and 5 deletions
+3 -2
View File
@@ -232,6 +232,8 @@ def validate_use_legacy(value):
if (not value[CONF_USE_LEGACY]) and (CORE.using_arduino):
raise cv.Invalid("Arduino supports only the legacy i2s driver")
_set_use_legacy_driver(value[CONF_USE_LEGACY])
elif CORE.using_arduino:
_set_use_legacy_driver(True)
return value
@@ -261,8 +263,7 @@ def _final_validate(_):
def use_legacy():
legacy_driver = _get_use_legacy_driver()
return not (CORE.is_esp32 and not legacy_driver)
return _get_use_legacy_driver()
FINAL_VALIDATE_SCHEMA = _final_validate
+1 -3
View File
@@ -798,10 +798,8 @@ class EsphomeCore:
@property
def using_esp_idf(self):
# Deprecated: use is_esp32 instead, as Arduino also builds ESP-IDF
logging.getLogger(__name__).warning(
"CORE.using_esp_idf is deprecated, use CORE.is_esp32 instead. "
"Arduino on ESP32 also uses ESP-IDF."
"CORE.using_esp_idf was deprecated in 2026.1, use CORE.is_esp32 and/or CORE.using_arduino instead."
)
return self.target_framework == "esp-idf"