Skip to content

Commit

Permalink
Fix Hass 2024.9 support #1434
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Sep 4, 2024
1 parent 1c835f9 commit a85b0df
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion custom_components/xiaomi_gateway3/core/converters/silabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from zigpy.zcl import Cluster
from zigpy.zcl.foundation import (
DATA_TYPES,
GENERAL_COMMANDS,
CommandSchema,
TypeValue,
Expand All @@ -19,6 +18,15 @@
Status as ZDOStatus,
)

try:
# for https://github.com/zigpy/zigpy/blob/0.66.0/zigpy/zcl/foundation.py
from zigpy.zcl.foundation import DataType

DATA_TYPES = {int(d.type_id): d for d in DataType}
except ImportError:
# for https://github.com/zigpy/zigpy/blob/0.65.4/zigpy/zcl/foundation.py
from zigpy.zcl.foundation import DATA_TYPES

_LOGGER = logging.getLogger(__name__)

CLUSTERS = {}
Expand Down

0 comments on commit a85b0df

Please sign in to comment.