EntityComponent.add_entities now converts generators to a list (#4183)
This commit is contained in:
parent
8e0838adeb
commit
2940fb72fb
2 changed files with 19 additions and 2 deletions
|
@ -283,7 +283,7 @@ class EntityPlatform(object):
|
|||
def add_entities(self, new_entities, update_before_add=False):
|
||||
"""Add entities for a single platform."""
|
||||
run_coroutine_threadsafe(
|
||||
self.async_add_entities(new_entities, update_before_add),
|
||||
self.async_add_entities(list(new_entities), update_before_add),
|
||||
self.component.hass.loop
|
||||
).result()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue