Skip to content

Commit

Permalink
Merge pull request #152 from puddly/rc
Browse files Browse the repository at this point in the history
0.18.3 Release
  • Loading branch information
puddly authored Sep 27, 2023
2 parents 8dec8f4 + a4e3a72 commit a006278
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion zigpy_xbee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAJOR_VERSION = 0
MINOR_VERSION = 18
PATCH_VERSION = "2"
PATCH_VERSION = "3"
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"
6 changes: 5 additions & 1 deletion zigpy_xbee/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

LOGGER = logging.getLogger(__name__)

AT_COMMAND_TIMEOUT = 1
AT_COMMAND_TIMEOUT = 3
REMOTE_AT_COMMAND_TIMEOUT = 30
PROBE_TIMEOUT = 45

Expand Down Expand Up @@ -347,6 +347,10 @@ async def _reconnect_till_done(self) -> None:
)

def close(self):
if self._conn_lost_task:
self._conn_lost_task.cancel()
self._conn_lost_task = None

if self._uart:
self._uart.close()
self._uart = None
Expand Down
11 changes: 6 additions & 5 deletions zigpy_xbee/zigbee/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async def disconnect(self):
"""Shutdown application."""
if self._api:
self._api.close()
self._api = None

async def connect(self):
self._api = await zigpy_xbee.api.XBee.new(self, self._config[CONF_DEVICE])
Expand Down Expand Up @@ -191,11 +192,11 @@ async def force_remove(self, dev):
async def add_endpoint(self, descriptor: zdo_t.SimpleDescriptor) -> None:
"""Register a new endpoint on the device."""
self._device.replacement["endpoints"][descriptor.endpoint] = {
"device_type": descriptor.device_type,
"profile_id": descriptor.profile,
"input_clusters": descriptor.input_clusters,
"output_clusters": descriptor.output_clusters,
}
"device_type": descriptor.device_type,
"profile_id": descriptor.profile,
"input_clusters": descriptor.input_clusters,
"output_clusters": descriptor.output_clusters,
}
self._device.add_endpoint(descriptor.endpoint)

async def _get_association_state(self):
Expand Down

0 comments on commit a006278

Please sign in to comment.