Now converting config values to dictionaries if they are None

This commit is contained in:
theolind 2015-02-28 20:17:50 +01:00
parent 8da1fb1d74
commit 461e0d0314

View File

@ -79,7 +79,8 @@ def from_config_dict(config, hass=None):
# Make a copy because we are mutating it.
# Convert it to defaultdict so components can always have config dict
config = defaultdict(dict, config)
# Convert values to dictionaries if they are None
config = defaultdict(dict, {key: value or {} for key, value in config.items()})
# Filter out the repeating and common config section [homeassistant]
components = (key for key in config.keys()