From c5f59fad626534c55d58ad6927ab994cafc6a7b3 Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Sat, 26 Nov 2022 20:17:07 +0100 Subject: [PATCH] Fix regressed 'esphome run' (#4094) --- esphome/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index a4f010c6ad..3ad69d27cd 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -298,7 +298,7 @@ def upload_program(config, args, host): ota_conf = config[CONF_OTA] remote_port = ota_conf[CONF_PORT] password = ota_conf.get(CONF_PASSWORD, "") - if args.file is not None: + if getattr(args, "file", None) is not None: return espota2.run_ota(host, remote_port, password, args.file) return espota2.run_ota(host, remote_port, password, CORE.firmware_bin)