self.loop.create_task -> self.add_job (#6632)

* self.loop.create_task -> self.add_job

* Core to use create task
This commit is contained in:
Paulus Schoutsen 2017-03-15 22:58:54 -07:00 committed by Pascal Vizeli
parent 5b3dc7f2a5
commit e265401cd0
13 changed files with 16 additions and 15 deletions

View file

@ -419,7 +419,7 @@ class EntityPlatform(object):
update_coro = entity.async_update_ha_state(True)
if hasattr(entity, 'async_update'):
tasks.append(
self.component.hass.loop.create_task(update_coro))
self.component.hass.async_add_job(update_coro))
else:
to_update.append(update_coro)