diff --git a/custom_components/mikrotik_router/__init__.py b/custom_components/mikrotik_router/__init__.py index d3c874e..e5436b0 100644 --- a/custom_components/mikrotik_router/__init__.py +++ b/custom_components/mikrotik_router/__init__.py @@ -42,6 +42,8 @@ async def async_setup_entry(hass, config_entry): """Set up Mikrotik Router as config entry.""" controller = MikrotikControllerData(hass, config_entry) await controller.async_hwinfo_update() + if not controller.connected(): + raise ConfigEntryNotReady(f"Cannot connect to host") await controller.async_update()