mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 17:48:40 +00:00
Fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user