mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-03 17:34:29 +02:00
Added exception on connection failure during startup.
This commit is contained in:
parent
8d3e86a988
commit
3b95198ad8
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue