Use ZigbeeException instead of DeliveryError in ZHA (#33993)

* Use ZigbeeException instead of DeliveryError

* cleanup get_attributes
This commit is contained in:
David F. Mulcahey 2020-04-11 12:01:49 -04:00 committed by GitHub
parent 8c4a139aeb
commit 946b77e2ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 21 deletions

View file

@ -511,7 +511,7 @@ class ZHADevice(LogMixin):
response,
)
return response
except zigpy.exceptions.DeliveryError as exc:
except zigpy.exceptions.ZigbeeException as exc:
self.debug(
"failed to set attribute: %s %s %s %s %s",
f"{ATTR_VALUE}: {value}",
@ -563,7 +563,7 @@ class ZHADevice(LogMixin):
"""Remove this device from the provided zigbee group."""
try:
await self._zigpy_device.remove_from_group(group_id)
except (zigpy.exceptions.DeliveryError, asyncio.TimeoutError) as ex:
except (zigpy.exceptions.ZigbeeException, asyncio.TimeoutError) as ex:
self.debug(
"Failed to remove device '%s' from group: 0x%04x ex: %s",
self._zigpy_device.ieee,