Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change import of ZHAGateway from zha.core #240

Merged
merged 5 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading