We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92b8345 commit e6d7827Copy full SHA for e6d7827
plugwise_usb/nodes/sed.py
@@ -9,6 +9,7 @@
9
Task,
10
gather,
11
get_running_loop,
12
+ iscoroutine,
13
wait_for,
14
)
15
from collections.abc import Awaitable, Callable, Coroutine
@@ -663,9 +664,9 @@ async def schedule_task_when_awake(
663
664
self, task_fn: Coroutine[Any, Any, bool]
665
) -> None:
666
"""Add task to queue to be executed when node is awake."""
- _LOGGER.debug("HOI tasktype: %s", type(task_fn))
667
- async with self._send_task_lock:
668
- self._send_task_queue.append(task_fn)
+ if iscoroutine(task_fn):
+ async with self._send_task_lock:
669
+ self._send_task_queue.append(task_fn)
670
671
async def sed_configure( # pylint: disable=too-many-arguments
672
self,
0 commit comments