mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Fix blocking/stack trace with empty list (#4191)
This commit is contained in:
parent
ee5f228309
commit
e5d69feb93
@ -296,6 +296,10 @@ class EntityPlatform(object):
|
|||||||
tasks = [self._async_process_entity(entity, update_before_add)
|
tasks = [self._async_process_entity(entity, update_before_add)
|
||||||
for entity in new_entities]
|
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 asyncio.gather(*tasks, loop=self.component.hass.loop)
|
||||||
yield from self.component.async_update_group()
|
yield from self.component.async_update_group()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user