From b62cfb395f3ace7fe91030338c125dc9989baa05 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:23:57 -0400 Subject: [PATCH 1/3] Disable energy scanning (#142) --- zigpy_xbee/zigbee/application.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zigpy_xbee/zigbee/application.py b/zigpy_xbee/zigbee/application.py index 1162b83..818f656 100644 --- a/zigpy_xbee/zigbee/application.py +++ b/zigpy_xbee/zigbee/application.py @@ -174,6 +174,14 @@ async def _move_network_to_channel( scan_bitmask = 1 << (new_channel - 11) await self._api._queued_at("SC", scan_bitmask) + async def energy_scan( + self, channels: zigpy.types.Channels, duration_exp: int, count: int + ) -> dict[int, float]: + """Runs an energy detection scan and returns the per-channel scan results.""" + + LOGGER.warning("Coordinator does not support energy scanning") + return {c: 0 for c in channels} + async def force_remove(self, dev): """Forcibly remove device from NCP.""" pass From 6485f59f815c5e3310deb38b410f8344a86efa9e Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 23 Jun 2023 10:38:17 -0400 Subject: [PATCH 2/3] Bump minimum zigpy version to 0.56.0 (#144) --- setup.py | 2 +- zigpy_xbee/zigbee/application.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 313e926..30b3992 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,6 @@ author_email="rcloran@gmail.com", license="GPL-3.0", packages=find_packages(exclude=["tests", "tests.*"]), - install_requires=["zigpy>=0.51.0"], + install_requires=["zigpy>=0.56.0"], tests_require=["pytest", "asynctest", "pytest-asyncio"], ) diff --git a/zigpy_xbee/zigbee/application.py b/zigpy_xbee/zigbee/application.py index 818f656..8c4db1b 100644 --- a/zigpy_xbee/zigbee/application.py +++ b/zigpy_xbee/zigbee/application.py @@ -263,7 +263,7 @@ async def send_packet(self, packet: zigpy.types.ZigbeePacket) -> None: f"Failed to deliver packet: {v!r}", status=v ) - @zigpy.util.retryable_request + @zigpy.util.retryable_request() def remote_at_command( self, nwk, cmd_name, *args, apply_changes=True, encryption=True ): From 0a5f84abf31b6034754a1fdb3cc1b3d601aeb54e Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 23 Jun 2023 09:39:51 -0500 Subject: [PATCH 3/3] Bump version to 0.18.1 --- zigpy_xbee/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigpy_xbee/__init__.py b/zigpy_xbee/__init__.py index 817e03a..611857f 100644 --- a/zigpy_xbee/__init__.py +++ b/zigpy_xbee/__init__.py @@ -1,5 +1,5 @@ MAJOR_VERSION = 0 MINOR_VERSION = 18 -PATCH_VERSION = "0.dev0" +PATCH_VERSION = "1" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}"