Skip to content

Commit

Permalink
Merge pull request #240 from ChristophCaina/ChristophCaina-patch-1
Browse files Browse the repository at this point in the history
change import of ZHAGateway from zha.core
  • Loading branch information
mdeweerd committed Aug 1, 2024
2 parents e5a4910 + 2ba1ba9 commit dcd2b82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion custom_components/zha_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant.components.zha.core.gateway import ZHAGateway

try:
from homeassistant.components.zha import Gateway as ZHAGateway
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
Expand Down
7 changes: 6 additions & 1 deletion custom_components/zha_toolkit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
from enum import Enum

import zigpy
from homeassistant.components.zha.core.gateway import ZHAGateway

try:
from homeassistant.components.zha import Gateway as ZHAGateway
except ImportError:
from homeassistant.components.zha.core.gateway import ZHAGateway

from homeassistant.util import dt as dt_util
from pkg_resources import get_distribution, parse_version
from zigpy import types as t
Expand Down

0 comments on commit dcd2b82

Please sign in to comment.