fix empty config while first setup

This commit is contained in:
Andrey Viktorov
2021-03-29 19:54:48 +03:00
parent 7d777c9e82
commit 687e80f729

View File

@@ -91,6 +91,8 @@ class MegaD:
**kwargs,
):
"""Initialize."""
if DOMAIN not in hass.data:
hass.data[DOMAIN] = {}
if config is not None:
lg.debug(f'load config: %s', config.data)
self.config = config