mirror of
https://github.com/esphome/esphome.git
synced 2025-08-09 11:57:46 +00:00
tweak
This commit is contained in:
parent
4106b97174
commit
fe65b149f5
@ -1,6 +1,6 @@
|
|||||||
from esphome.components.esp32 import add_idf_component, add_idf_sdkconfig_option
|
from esphome.components.esp32 import add_idf_component, add_idf_sdkconfig_option
|
||||||
import esphome.config_validation as cv
|
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
|
from esphome.core import CORE
|
||||||
|
|
||||||
CODEOWNERS = ["@dentra"]
|
CODEOWNERS = ["@dentra"]
|
||||||
@ -16,7 +16,7 @@ async def to_code(config):
|
|||||||
add_idf_sdkconfig_option("CONFIG_HTTPD_MAX_REQ_HDR_LEN", 1024)
|
add_idf_sdkconfig_option("CONFIG_HTTPD_MAX_REQ_HDR_LEN", 1024)
|
||||||
|
|
||||||
# Check if web_server component has OTA enabled
|
# 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:
|
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 multipart parser component for ESP-IDF OTA support
|
||||||
add_idf_component(name="zorxx/multipart-parser", ref="1.0.1")
|
add_idf_component(name="zorxx/multipart-parser", ref="1.0.1")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user