From e0eac6ba25fdad2f12b53dcb4fd5a624b5267e55 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 15 Feb 2019 10:25:56 +0100 Subject: [PATCH] Make esphomeyaml rename a bit more graceful --- esphome/core_config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/esphome/core_config.py b/esphome/core_config.py index 59ca35fa80..229b3d9273 100644 --- a/esphome/core_config.py +++ b/esphome/core_config.py @@ -190,12 +190,11 @@ CONFIG_SCHEMA = vol.Schema({ def preload_core_config(config): + if 'esphomeyaml' in config: + _LOGGER.warning("The esphomeyaml section has been renamed to esphome in 1.11.0. " + "Please replace 'esphomeyaml:' in your configuration by 'esphome:'.") + config[CONF_ESPHOME] = config.pop('esphomeyaml') if CONF_ESPHOME not in config: - if 'esphomeyaml' in config: - raise EsphomeError(u"The top-level 'esphomeyaml' section has been renamed to " - u"'esphome' in 1.11.0.\n" - u"Please replace the esphomeyaml: line in your config with " - u"esphome:") raise EsphomeError(u"No esphome section in config") core_conf = config[CONF_ESPHOME] if CONF_PLATFORM not in core_conf: