diff --git a/custom_components/zha_toolkit/__init__.py b/custom_components/zha_toolkit/__init__.py index 9170042..96121bd 100644 --- a/custom_components/zha_toolkit/__init__.py +++ b/custom_components/zha_toolkit/__init__.py @@ -7,9 +7,9 @@ try: from homeassistant.components.zha import Gateway as ZHAGateway -except: +except ImportError: from homeassistant.components.zha.core.gateway import ZHAGateway - + from homeassistant.util import dt as dt_util from zigpy import types as t from zigpy.exceptions import DeliveryError diff --git a/custom_components/zha_toolkit/utils.py b/custom_components/zha_toolkit/utils.py index 48e6877..e897df6 100644 --- a/custom_components/zha_toolkit/utils.py +++ b/custom_components/zha_toolkit/utils.py @@ -13,7 +13,7 @@ try: from homeassistant.components.zha import Gateway as ZHAGateway -except: +except ImportError: from homeassistant.components.zha.core.gateway import ZHAGateway from homeassistant.util import dt as dt_util