Skip to content

Commit

Permalink
increase probing timeout, fix #68
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Nov 19, 2020
1 parent 8f95aaa commit 62d4144
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zigpy_zigate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAJOR_VERSION = 0
MINOR_VERSION = 7
PATCH_VERSION = '2'
PATCH_VERSION = '3'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
3 changes: 2 additions & 1 deletion zigpy_zigate/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
LOGGER = logging.getLogger(__name__)

COMMAND_TIMEOUT = 1.5
PROBE_TIMEOUT = 3.0

RESPONSES = {
0x004D: (t.NWK, t.EUI64, t.uint8_t, t.uint8_t),
Expand Down Expand Up @@ -254,7 +255,7 @@ async def probe(cls, device_config: Dict[str, Any]) -> bool:
"""Probe port for the device presence."""
api = cls(zigpy_zigate.config.SCHEMA_DEVICE(device_config))
try:
await asyncio.wait_for(api._probe(), timeout=COMMAND_TIMEOUT)
await asyncio.wait_for(api._probe(), timeout=PROBE_TIMEOUT)
return True
except (
asyncio.TimeoutError,
Expand Down

0 comments on commit 62d4144

Please sign in to comment.