1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 04:12:23 +01:00

move ota to ota_network

This commit is contained in:
Tomasz Duda
2024-02-12 00:31:23 +01:00
parent dce27a8e82
commit def796cd3a
17 changed files with 11 additions and 3 deletions

View File

@@ -17,8 +17,13 @@ from esphome.const import (
from esphome.core import CORE, coroutine_with_priority
CODEOWNERS = ["@esphome/core"]
DEPENDENCIES = ["network"]
AUTO_LOAD = ["socket", "md5"]
def AUTO_LOAD():
if CORE.using_zephyr:
return ["ota_mcuboot"]
return ["ota_network"]
CONF_ON_STATE_CHANGE = "on_state_change"
CONF_ON_BEGIN = "on_begin"
@@ -90,7 +95,7 @@ async def to_code(config):
CORE.data[CONF_OTA] = {}
var = cg.new_Pvariable(config[CONF_ID])
cg.add(var.set_port(config[CONF_PORT]))
# cg.add(var.set_port(config[CONF_PORT]))
cg.add_define("USE_OTA")
if CONF_PASSWORD in config:
cg.add(var.set_auth_password(config[CONF_PASSWORD]))

View File

@@ -0,0 +1,3 @@
CODEOWNERS = ["@esphome/core"]
DEPENDENCIES = ["network"]
AUTO_LOAD = ["socket", "md5"]