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:41:39 -08:00
1 parent c7c47a18a9
commit 9a7a0f28b1
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())