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 authored and Paulus Schoutsen committed 2018-03-10 10:02:04 -08:00
1 parent 7ea7fc8d38
commit 40485a6e89
3 files changed
+14 -4

No files matched your search

+5
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())