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 authored and Pascal Vizeli committed 2017-03-16 06:58:54 +01:00
1 parent 5b3dc7f2a5
commit e265401cd0
13 files changed
+16 -15

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ def async_setup(hass, config):
if not switch.should_poll:
continue
update_coro = hass.loop.create_task(
update_coro = hass.async_add_job(
switch.async_update_ha_state(True))
if hasattr(switch, 'async_update'):
update_tasks.append(update_coro)