Skip to content

Commit 64e1e41

Browse files
glmnetsilverchris
authored andcommitted
fix esphome better error out (esphome#843)
* fix esphome better error out * lint * not in then
1 parent 1a651b7 commit 64e1e41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

esphome/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ def upload_program(config, args, host):
188188

189189
from esphome import espota2
190190

191+
if CONF_OTA not in config:
192+
raise EsphomeError("Cannot upload Over the Air as the config does not include the ota: "
193+
"component")
194+
191195
ota_conf = config[CONF_OTA]
192196
remote_port = ota_conf[CONF_PORT]
193197
password = ota_conf[CONF_PASSWORD]

0 commit comments

Comments
 (0)