mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Make esphomeyaml rename a bit more graceful
This commit is contained in:
		| @@ -190,12 +190,11 @@ CONFIG_SCHEMA = vol.Schema({ | |||||||
|  |  | ||||||
|  |  | ||||||
| def preload_core_config(config): | def preload_core_config(config): | ||||||
|     if CONF_ESPHOME not in config: |  | ||||||
|     if 'esphomeyaml' in config: |     if 'esphomeyaml' in config: | ||||||
|             raise EsphomeError(u"The top-level 'esphomeyaml' section has been renamed to " |         _LOGGER.warning("The esphomeyaml section has been renamed to esphome in 1.11.0. " | ||||||
|                                u"'esphome' in 1.11.0.\n" |                         "Please replace 'esphomeyaml:' in your configuration by 'esphome:'.") | ||||||
|                                u"Please replace the esphomeyaml: line in your config with " |         config[CONF_ESPHOME] = config.pop('esphomeyaml') | ||||||
|                                u"esphome:") |     if CONF_ESPHOME not in config: | ||||||
|         raise EsphomeError(u"No esphome section in config") |         raise EsphomeError(u"No esphome section in config") | ||||||
|     core_conf = config[CONF_ESPHOME] |     core_conf = config[CONF_ESPHOME] | ||||||
|     if CONF_PLATFORM not in core_conf: |     if CONF_PLATFORM not in core_conf: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user