Skip to content

Commit

Permalink
Fix "Passing coroutines is forbidden, use tasks explicitly" (Closes: #…
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Jun 9, 2023
1 parent 20c97ce commit 256192b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miio_fan/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ async def async_service_handler(service):
if not hasattr(device, method["method"]):
continue
await getattr(device, method["method"])(**params)
update_tasks.append(device.async_update_ha_state(True))
update_tasks.append(asyncio.create_task(device.async_update_ha_state(True)))

if update_tasks:
await asyncio.wait(update_tasks)
Expand Down

0 comments on commit 256192b

Please sign in to comment.