mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
Bugfix create a task from a task in component update (#5033)
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user