mirror of
https://github.com/esphome/esphome.git
synced 2024-11-16 10:45:48 +01:00
The walrus ran away
This commit is contained in:
parent
e234557cf3
commit
164936c5fb
@ -332,11 +332,10 @@ def upload_program(config, args, host):
|
||||
return 1 # Unknown target platform
|
||||
|
||||
ota_conf = {}
|
||||
if ota := config.get(CONF_OTA):
|
||||
for ota_item in ota:
|
||||
if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
|
||||
ota_conf = ota_item
|
||||
break
|
||||
for ota_item in config.get(CONF_OTA, []):
|
||||
if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
|
||||
ota_conf = ota_item
|
||||
break
|
||||
|
||||
if not ota_conf:
|
||||
raise EsphomeError(
|
||||
|
@ -142,11 +142,10 @@ async def build_registry_list(registry, config):
|
||||
|
||||
async def past_safe_mode():
|
||||
ota_conf = {}
|
||||
if CONF_OTA in CORE.config:
|
||||
for ota_item in CORE.config.get(CONF_OTA):
|
||||
if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
|
||||
ota_conf = ota_item
|
||||
break
|
||||
for ota_item in CORE.config.get(CONF_OTA, []):
|
||||
if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
|
||||
ota_conf = ota_item
|
||||
break
|
||||
|
||||
if not ota_conf:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user