Protect against bad data stored in ZHA (#30183)
This commit is contained in:
parent
3aa2ae1700
commit
85d2ba047b
1 changed files with 5 additions and 1 deletions
|
@ -449,7 +449,11 @@ async def remove_group(group, zha_gateway):
|
|||
group.group_id
|
||||
)
|
||||
)
|
||||
await asyncio.gather(*tasks)
|
||||
if tasks:
|
||||
await asyncio.gather(*tasks)
|
||||
else:
|
||||
# we have members but none are tracked by ZHA for whatever reason
|
||||
zha_gateway.application_controller.groups.pop(group.group_id)
|
||||
else:
|
||||
zha_gateway.application_controller.groups.pop(group.group_id)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue