fix esphome better error out (#843)

* fix esphome better error out

* lint

* not in then
This commit is contained in:
Guillermo Ruffino 2019-11-12 11:28:23 -03:00 committed by Otto Winter
parent 367ae906c3
commit 9580b13b9f

View File

@ -188,6 +188,10 @@ def upload_program(config, args, host):
from esphome import espota2 from esphome import espota2
if CONF_OTA not in config:
raise EsphomeError("Cannot upload Over the Air as the config does not include the ota: "
"component")
ota_conf = config[CONF_OTA] ota_conf = config[CONF_OTA]
remote_port = ota_conf[CONF_PORT] remote_port = ota_conf[CONF_PORT]
password = ota_conf[CONF_PASSWORD] password = ota_conf[CONF_PASSWORD]