File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11MAJOR_VERSION = 0
22MINOR_VERSION = 18
3- PATCH_VERSION = "2 "
3+ PATCH_VERSION = "3 "
44__short_version__ = f"{ MAJOR_VERSION } .{ MINOR_VERSION } "
55__version__ = f"{ __short_version__ } .{ PATCH_VERSION } "
Original file line number Diff line number Diff line change 1515
1616LOGGER = logging .getLogger (__name__ )
1717
18- AT_COMMAND_TIMEOUT = 1
18+ AT_COMMAND_TIMEOUT = 3
1919REMOTE_AT_COMMAND_TIMEOUT = 30
2020PROBE_TIMEOUT = 45
2121
@@ -347,6 +347,10 @@ async def _reconnect_till_done(self) -> None:
347347 )
348348
349349 def close (self ):
350+ if self ._conn_lost_task :
351+ self ._conn_lost_task .cancel ()
352+ self ._conn_lost_task = None
353+
350354 if self ._uart :
351355 self ._uart .close ()
352356 self ._uart = None
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ async def disconnect(self):
4949 """Shutdown application."""
5050 if self ._api :
5151 self ._api .close ()
52+ self ._api = None
5253
5354 async def connect (self ):
5455 self ._api = await zigpy_xbee .api .XBee .new (self , self ._config [CONF_DEVICE ])
@@ -191,11 +192,11 @@ async def force_remove(self, dev):
191192 async def add_endpoint (self , descriptor : zdo_t .SimpleDescriptor ) -> None :
192193 """Register a new endpoint on the device."""
193194 self ._device .replacement ["endpoints" ][descriptor .endpoint ] = {
194- "device_type" : descriptor .device_type ,
195- "profile_id" : descriptor .profile ,
196- "input_clusters" : descriptor .input_clusters ,
197- "output_clusters" : descriptor .output_clusters ,
198- }
195+ "device_type" : descriptor .device_type ,
196+ "profile_id" : descriptor .profile ,
197+ "input_clusters" : descriptor .input_clusters ,
198+ "output_clusters" : descriptor .output_clusters ,
199+ }
199200 self ._device .add_endpoint (descriptor .endpoint )
200201
201202 async def _get_association_state (self ):
You can’t perform that action at this time.
0 commit comments