feat(synology-srm): update to latest version and improve errors (#34144)

This commit is contained in:
Julien Brochet
2020-04-13 19:11:20 +02:00
committed by GitHub
parent 6d24a65313
commit 2239f2f732
4 changed files with 8 additions and 4 deletions

View File

@ -1 +1 @@
"""The synology_srm component."""
"""The Synology SRM component."""

View File

@ -132,7 +132,11 @@ class SynologySrmDeviceScanner(DeviceScanner):
"""Check the router for connected devices."""
_LOGGER.debug("Scanning for connected devices")
self.devices = self.client.core.network_nsm_device({"is_online": True})
try:
self.devices = self.client.core.get_network_nsm_device({"is_online": True})
except synology_srm.http.SynologyException as ex:
_LOGGER.error("Error with the Synology SRM: %s", ex)
return False
_LOGGER.debug("Found %d device(s) connected to the router", len(self.devices))

View File

@ -2,6 +2,6 @@
"domain": "synology_srm",
"name": "Synology SRM",
"documentation": "https://www.home-assistant.io/integrations/synology_srm",
"requirements": ["synology-srm==0.0.7"],
"requirements": ["synology-srm==0.2.0"],
"codeowners": ["@aerialls"]
}

View File

@ -1987,7 +1987,7 @@ surepy==0.2.3
swisshydrodata==0.0.3
# homeassistant.components.synology_srm
synology-srm==0.0.7
synology-srm==0.2.0
# homeassistant.components.tahoma
tahoma-api==0.0.16