mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Bugfix asyncio wait (#4946)
This commit is contained in:
parent
32dc518971
commit
8358ab56ea
@ -95,6 +95,7 @@ def async_setup(hass, config):
|
||||
attr = 'async_toggle'
|
||||
|
||||
tasks = [getattr(input_b, attr)() for input_b in target_inputs]
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=hass.loop)
|
||||
|
||||
hass.services.async_register(
|
||||
|
@ -113,6 +113,7 @@ def async_setup(hass, config):
|
||||
|
||||
tasks = [input_select.async_select_option(call.data[ATTR_OPTION])
|
||||
for input_select in target_inputs]
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=hass.loop)
|
||||
|
||||
hass.services.async_register(
|
||||
@ -126,6 +127,7 @@ def async_setup(hass, config):
|
||||
|
||||
tasks = [input_select.async_offset_index(1)
|
||||
for input_select in target_inputs]
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=hass.loop)
|
||||
|
||||
hass.services.async_register(
|
||||
@ -139,6 +141,7 @@ def async_setup(hass, config):
|
||||
|
||||
tasks = [input_select.async_offset_index(-1)
|
||||
for input_select in target_inputs]
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=hass.loop)
|
||||
|
||||
hass.services.async_register(
|
||||
|
@ -105,6 +105,7 @@ def async_setup(hass, config):
|
||||
|
||||
tasks = [input_slider.async_select_value(call.data[ATTR_VALUE])
|
||||
for input_slider in target_inputs]
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=hass.loop)
|
||||
|
||||
hass.services.async_register(
|
||||
|
Loading…
x
Reference in New Issue
Block a user