Skip to content

Commit

Permalink
--amen
Browse files Browse the repository at this point in the history
  • Loading branch information
Shulyaka committed Nov 11, 2022
1 parent 97a49fe commit 60b6a0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 6 additions & 5 deletions zhaquirks/xbee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import Any, List, Optional, Union

from zigpy.quirks import CustomDevice
import zigpy.types as zt
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import (
AnalogInput,
Expand Down Expand Up @@ -315,7 +316,7 @@ def remote_at_command(self, cmd_name, *args, apply_changes=True, **kwargs):

async def _remote_at_command(self, options, name, *args):
_LOGGER.debug("Remote AT command: %s %s", name, args)
data = t.serialize(args, (AT_COMMANDS[name],))
data = zt.serialize(args, (AT_COMMANDS[name],))
try:
return await asyncio.wait_for(
await self._command(options, name.encode("ascii"), data, *args),
Expand All @@ -339,7 +340,7 @@ async def _command(self, options, command, data, *args):
t.Bytes,
t.Bytes,
)
data = t.serialize(
data = zt.serialize(
(
0x32,
0x00,
Expand Down Expand Up @@ -434,7 +435,7 @@ def handle_cluster_request(
args: List[Any],
*,
dst_addressing: Optional[
Union[t.Addressing.Group, t.Addressing.IEEE, t.Addressing.NWK]
Union[zt.Addressing.Group, zt.Addressing.IEEE, zt.Addressing.NWK]
] = None,
):
"""Handle AT response."""
Expand Down Expand Up @@ -492,7 +493,7 @@ def handle_cluster_request(
args: List[Any],
*,
dst_addressing: Optional[
Union[t.Addressing.Group, t.Addressing.IEEE, t.Addressing.NWK]
Union[zt.Addressing.Group, zt.Addressing.IEEE, zt.Addressing.NWK]
] = None,
):
"""Handle the cluster request.
Expand Down Expand Up @@ -597,7 +598,7 @@ def handle_cluster_request(
args: List[Any],
*,
dst_addressing: Optional[
Union[t.Addressing.Group, t.Addressing.IEEE, t.Addressing.NWK]
Union[zt.Addressing.Group, zt.Addressing.IEEE, zt.Addressing.NWK]
] = None,
):
"""Handle incoming data."""
Expand Down
3 changes: 0 additions & 3 deletions zhaquirks/xbee/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,3 @@ def deserialize(cls, data):
},
data[sample_index:],
)


from zigpy.types import Addressing, serialize # noqa: F401,E402

0 comments on commit 60b6a0f

Please sign in to comment.