This commit is contained in:
J. Nick Koston 2025-06-29 22:34:42 -05:00
parent 4106b97174
commit fe65b149f5
No known key found for this signature in database

View File

@ -1,6 +1,6 @@
from esphome.components.esp32 import add_idf_component, add_idf_sdkconfig_option
import esphome.config_validation as cv
from esphome.const import CONF_OTA
from esphome.const import CONF_OTA, CONF_WEB_SERVER
from esphome.core import CORE
CODEOWNERS = ["@dentra"]
@ -16,7 +16,7 @@ async def to_code(config):
add_idf_sdkconfig_option("CONFIG_HTTPD_MAX_REQ_HDR_LEN", 1024)
# Check if web_server component has OTA enabled
web_server_config = CORE.config.get("web_server", {})
web_server_config = CORE.config.get(CONF_WEB_SERVER, {})
if web_server_config and web_server_config[CONF_OTA] and "ota" in CORE.config:
# Add multipart parser component for ESP-IDF OTA support
add_idf_component(name="zorxx/multipart-parser", ref="1.0.1")