diff --git a/custom_components/miwifi/__init__.py b/custom_components/miwifi/__init__.py index 9a99fd6..fe8edfd 100644 --- a/custom_components/miwifi/__init__.py +++ b/custom_components/miwifi/__init__.py @@ -41,6 +41,8 @@ async def async_setup(hass: HomeAssistant, config: dict) -> bool: if DOMAIN not in config: return success + hass.data.setdefault(DOMAIN, {}) + for router in config[DOMAIN]: hass.data[DOMAIN][router[CONF_IP_ADDRESS]] = router