mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Bugfix create a task from a task in component update (#5033)
This commit is contained in:
parent
4c9347eb2a
commit
9a16054867
@ -115,7 +115,7 @@ def async_setup(hass, config):
|
|||||||
update_coro = hass.loop.create_task(
|
update_coro = hass.loop.create_task(
|
||||||
alarm.async_update_ha_state(True))
|
alarm.async_update_ha_state(True))
|
||||||
if hasattr(alarm, 'async_update'):
|
if hasattr(alarm, 'async_update'):
|
||||||
update_tasks.append(hass.loop.create_task(update_coro))
|
update_tasks.append(update_coro)
|
||||||
else:
|
else:
|
||||||
yield from update_coro
|
yield from update_coro
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ def async_setup(hass, config):
|
|||||||
update_coro = hass.loop.create_task(
|
update_coro = hass.loop.create_task(
|
||||||
light.async_update_ha_state(True))
|
light.async_update_ha_state(True))
|
||||||
if hasattr(light, 'async_update'):
|
if hasattr(light, 'async_update'):
|
||||||
update_tasks.append(hass.loop.create_task(update_coro))
|
update_tasks.append(update_coro)
|
||||||
else:
|
else:
|
||||||
yield from update_coro
|
yield from update_coro
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ def async_setup(hass, config):
|
|||||||
update_coro = hass.loop.create_task(
|
update_coro = hass.loop.create_task(
|
||||||
remote.async_update_ha_state(True))
|
remote.async_update_ha_state(True))
|
||||||
if hasattr(remote, 'async_update'):
|
if hasattr(remote, 'async_update'):
|
||||||
update_tasks.append(hass.loop.create_task(update_coro))
|
update_tasks.append(update_coro)
|
||||||
else:
|
else:
|
||||||
yield from update_coro
|
yield from update_coro
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ def async_setup(hass, config):
|
|||||||
update_coro = hass.loop.create_task(
|
update_coro = hass.loop.create_task(
|
||||||
switch.async_update_ha_state(True))
|
switch.async_update_ha_state(True))
|
||||||
if hasattr(switch, 'async_update'):
|
if hasattr(switch, 'async_update'):
|
||||||
update_tasks.append(hass.loop.create_task(update_coro))
|
update_tasks.append(update_coro)
|
||||||
else:
|
else:
|
||||||
yield from update_coro
|
yield from update_coro
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user