Skip to content

Commit

Permalink
Bugfix create a task from a task in component update (home-assistant#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Dec 21, 2016
1 parent 35b4da0 commit f18a88c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/alarm_control_panel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def async_alarm_service_handler(service):
update_coro = hass.loop.create_task(
alarm.async_update_ha_state(True))
if hasattr(alarm, 'async_update'):
update_tasks.append(hass.loop.create_task(update_coro))
update_tasks.append(update_coro)
else:
yield from update_coro

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def async_handle_light_service(service):
update_coro = hass.loop.create_task(
light.async_update_ha_state(True))
if hasattr(light, 'async_update'):
update_tasks.append(hass.loop.create_task(update_coro))
update_tasks.append(update_coro)
else:
yield from update_coro

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/remote/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def async_handle_remote_service(service):
update_coro = hass.loop.create_task(
remote.async_update_ha_state(True))
if hasattr(remote, 'async_update'):
update_tasks.append(hass.loop.create_task(update_coro))
update_tasks.append(update_coro)
else:
yield from update_coro

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def async_handle_switch_service(service):
update_coro = hass.loop.create_task(
switch.async_update_ha_state(True))
if hasattr(switch, 'async_update'):
update_tasks.append(hass.loop.create_task(update_coro))
update_tasks.append(update_coro)
else:
yield from update_coro

Expand Down

0 comments on commit f18a88c

Please sign in to comment.