diff --git a/custom_components/hubitat/__init__.py b/custom_components/hubitat/__init__.py index d35b98b..dd23da7 100644 --- a/custom_components/hubitat/__init__.py +++ b/custom_components/hubitat/__init__.py @@ -34,11 +34,11 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b hub = Hub(hass, config_entry, len(hass.data[DOMAIN]) + 1) + hass.data[DOMAIN][config_entry.entry_id] = hub + if not await hub.async_setup(): return False - hass.data[DOMAIN][config_entry.entry_id] = hub - hub.async_update_device_registry() async_register_services(hass, config_entry)