1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-08 20:00:27 +01:00

The walrus ran away

This commit is contained in:
Jesse Hills 2024-04-29 11:50:23 +12:00
parent e234557cf3
commit 164936c5fb
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
2 changed files with 8 additions and 10 deletions

View File

@ -332,8 +332,7 @@ def upload_program(config, args, host):
return 1 # Unknown target platform return 1 # Unknown target platform
ota_conf = {} ota_conf = {}
if ota := config.get(CONF_OTA): for ota_item in config.get(CONF_OTA, []):
for ota_item in ota:
if ota_item[CONF_PLATFORM] == CONF_ESPHOME: if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
ota_conf = ota_item ota_conf = ota_item
break break

View File

@ -142,8 +142,7 @@ async def build_registry_list(registry, config):
async def past_safe_mode(): async def past_safe_mode():
ota_conf = {} ota_conf = {}
if CONF_OTA in CORE.config: for ota_item in CORE.config.get(CONF_OTA, []):
for ota_item in CORE.config.get(CONF_OTA):
if ota_item[CONF_PLATFORM] == CONF_ESPHOME: if ota_item[CONF_PLATFORM] == CONF_ESPHOME:
ota_conf = ota_item ota_conf = ota_item
break break