Handle offline gateways in devolo Home Control (#42897)

This commit is contained in:
Guido Schmitz 2020-11-06 12:49:47 +01:00 committed by GitHub
parent 15da7b3ca6
commit c7b2147e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
import asyncio
from functools import partial
from devolo_home_control_api.exceptions.gateway import GatewayOfflineError
from devolo_home_control_api.homecontrol import HomeControl
from devolo_home_control_api.mydevolo import Mydevolo
@ -56,7 +57,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
)
)
)
except ConnectionError as err:
except (ConnectionError, GatewayOfflineError) as err:
raise ConfigEntryNotReady from err
for platform in PLATFORMS: