From 9580b13b9f7f62b505b19e4b7856d723bbdf3ac9 Mon Sep 17 00:00:00 2001 From: Guillermo Ruffino Date: Tue, 12 Nov 2019 11:28:23 -0300 Subject: [PATCH] fix esphome better error out (#843) * fix esphome better error out * lint * not in then --- esphome/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index 6d3705c87e..3ce116739b 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -188,6 +188,10 @@ def upload_program(config, args, host): 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] remote_port = ota_conf[CONF_PORT] password = ota_conf[CONF_PASSWORD]