Cleanup ZHA group entity lifecycle (#33977)
* Clean up ZHA group entity lifecycle * group entities don't use state restore * add tests
This commit is contained in:
parent
14c35c9223
commit
13dda7bd98
7 changed files with 125 additions and 45 deletions
|
@ -561,7 +561,15 @@ class ZHADevice(LogMixin):
|
|||
|
||||
async def async_remove_from_group(self, group_id):
|
||||
"""Remove this device from the provided zigbee group."""
|
||||
await self._zigpy_device.remove_from_group(group_id)
|
||||
try:
|
||||
await self._zigpy_device.remove_from_group(group_id)
|
||||
except (zigpy.exceptions.DeliveryError, asyncio.TimeoutError) as ex:
|
||||
self.debug(
|
||||
"Failed to remove device '%s' from group: 0x%04x ex: %s",
|
||||
self._zigpy_device.ieee,
|
||||
group_id,
|
||||
str(ex),
|
||||
)
|
||||
|
||||
async def async_bind_to_group(self, group_id, cluster_bindings):
|
||||
"""Directly bind this device to a group for the given clusters."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue