more relos

This commit is contained in:
J. Nick Koston
2025-07-01 15:35:40 -05:00
parent a1e3b67683
commit 3f650b2c15
2 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import esphome.codegen as cg
from esphome.components.ota import BASE_OTA_SCHEMA, OTAComponent, ota_to_code
import esphome.config_validation as cv
from esphome.const import CONF_ID
from esphome.core import coroutine_with_priority
from esphome.core import CORE, coroutine_with_priority
CODEOWNERS = ["@esphome/core"]
DEPENDENCIES = ["network", "web_server_base"]
@@ -27,3 +27,9 @@ async def to_code(config):
await ota_to_code(var, config)
await cg.register_component(var, config)
cg.add_define("USE_WEBSERVER_OTA")
# Add multipart parser dependency for ESP-IDF
if CORE.using_esp_idf:
from esphome.components.esp32 import add_idf_component
add_idf_component(name="zorxx/multipart-parser", ref="1.0.1")

View File

@@ -1,7 +1,5 @@
from esphome.components.esp32 import add_idf_component, add_idf_sdkconfig_option
from esphome.components.esp32 import add_idf_sdkconfig_option
import esphome.config_validation as cv
from esphome.const import CONF_OTA, CONF_WEB_SERVER
from esphome.core import CORE
CODEOWNERS = ["@dentra"]
@@ -14,7 +12,3 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config):
# Increase the maximum supported size of headers section in HTTP request packet to be processed by the server
add_idf_sdkconfig_option("CONFIG_HTTPD_MAX_REQ_HDR_LEN", 1024)
# Check if web_server component has OTA enabled
if CORE.config.get(CONF_WEB_SERVER, {}).get(CONF_OTA, True):
# Add multipart parser component for ESP-IDF OTA support
add_idf_component(name="zorxx/multipart-parser", ref="1.0.1")