Fix blocking/stack trace with empty list (#4191)
This commit is contained in:
parent
ee5f228309
commit
e5d69feb93
1 changed files with 4 additions and 0 deletions
|
@ -296,6 +296,10 @@ class EntityPlatform(object):
|
|||
tasks = [self._async_process_entity(entity, update_before_add)
|
||||
for entity in new_entities]
|
||||
|
||||
# handle empty list from component/platform
|
||||
if not tasks:
|
||||
return
|
||||
|
||||
yield from asyncio.gather(*tasks, loop=self.component.hass.loop)
|
||||
yield from self.component.async_update_group()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue