Skip to content

Commit

Permalink
Merge pull request #62 from mdeweerd/dev
Browse files Browse the repository at this point in the history
 Accept ValueError as failing discovery (scan_device)
  • Loading branch information
mdeweerd authored May 3, 2022
2 parents cbb9d64 + ad0f61b commit bfdc8a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions STATS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Badges showing number of downloads per version

- ![badge latest](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/latest/total.svg)
- ![badge v0.8.7](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.7/total.svg)
- ![badge v0.8.6](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.6/total.svg)
- ![badge v0.8.5](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.5/total.svg)
- ![badge v0.8.4](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.4/total.svg)
- ![badge v0.8.3](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.3/total.svg)
- ![badge v0.8.2](https://img.shields.io/github/downloads/mdeweerd/zha-toolkit/v0.8.2/total.svg)
Expand Down
6 changes: 3 additions & 3 deletions custom_components/zha_toolkit/scan_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ async def discover_attributes_extended(cluster, manufacturer=None):
manufacturer=manufacturer,
)
await asyncio.sleep(0.2)
except (DeliveryError, asyncio.TimeoutError) as ex:
except (ValueError, DeliveryError, asyncio.TimeoutError) as ex:
LOGGER.error(
(
"Failed 'discover_attributes_extended'"
Expand Down Expand Up @@ -284,7 +284,7 @@ async def discover_commands_received(cluster, is_server, manufacturer=None):
manufacturer=manufacturer,
)
await asyncio.sleep(0.2)
except (DeliveryError, asyncio.TimeoutError) as ex:
except (ValueError, DeliveryError, asyncio.TimeoutError) as ex:
LOGGER.error(
"Failed to discover %s commands starting %s. Error: %s",
cmd_id,
Expand Down Expand Up @@ -338,7 +338,7 @@ async def discover_commands_generated(cluster, is_server, manufacturer=None):
manufacturer=manufacturer,
)
await asyncio.sleep(0.2)
except (DeliveryError, asyncio.TimeoutError) as ex:
except (ValueError, DeliveryError, asyncio.TimeoutError) as ex:
LOGGER.error(
"Failed to discover commands starting %s. Error: %s",
cmd_id,
Expand Down

0 comments on commit bfdc8a1

Please sign in to comment.