mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Bugfix create a task from a task in component update (#5033)
This commit is contained in:
parent
35b4da0aa2
commit
f18a88c2d4
@ -115,7 +115,7 @@ def async_setup(hass, config):
|
||||
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
|
||||
|
||||
|
@ -253,7 +253,7 @@ def async_setup(hass, config):
|
||||
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
|
||||
|
||||
|
@ -115,7 +115,7 @@ def async_setup(hass, config):
|
||||
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
|
||||
|
||||
|
@ -98,7 +98,7 @@ def async_setup(hass, config):
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user