EntityComponent.add_entities now converts generators to a list (#4183)

This commit is contained in:
Paulus Schoutsen 2016-11-02 19:24:25 -07:00 committed by GitHub
parent 8e0838adeb
commit 2940fb72fb
2 changed files with 19 additions and 2 deletions

View file

@ -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()