Ensure we have valid config AFTER merging packages #13015 (#13038)

* Ensure we have valid config AFTER merging packages #13015

* also fix packages
This commit is contained in:
Johann Kellerman 2018-03-10 20:02:04 +02:00 committed by Paulus Schoutsen
parent 7ea7fc8d38
commit 40485a6e89
3 changed files with 14 additions and 4 deletions

View file

@ -326,6 +326,11 @@ def check_ha_config_file(config_dir):
config, core_config.get(CONF_PACKAGES, {}), _pack_error)
del core_config[CONF_PACKAGES]
# Ensure we have no None values after merge
for key, value in config.items():
if not value:
config[key] = {}
# Filter out repeating config sections
components = set(key.split(' ')[0] for key in config.keys())