From 84ae4c0f33ed2a8da97ab197e5591025ac632b20 Mon Sep 17 00:00:00 2001 From: Amos Yuen Date: Sun, 11 Jun 2023 07:43:09 +0000 Subject: [PATCH] Fix "Passing coroutines is forbidden, use tasks explicitly" error in HA 2023.6 --- custom_components/mikucare/__init__.py | 2 +- custom_components/mikucare/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mikucare/__init__.py b/custom_components/mikucare/__init__.py index 196aebc..7c57c45 100644 --- a/custom_components/mikucare/__init__.py +++ b/custom_components/mikucare/__init__.py @@ -62,7 +62,7 @@ async def async_create_data( for device in devices: coordinator = MikuCareDeviceUpdateCoordinator(hass, api, device) device_coordinators.append(coordinator) - futures.append(coordinator.connect()) + futures.append(asyncio.create_task(coordinator.connect())) await asyncio.wait(futures) return { diff --git a/custom_components/mikucare/manifest.json b/custom_components/mikucare/manifest.json index d2b4faf..d669e03 100644 --- a/custom_components/mikucare/manifest.json +++ b/custom_components/mikucare/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/amosyuen/ha-mikucare/issues", "requirements": ["boto3>=1.26.59"], - "version": "1.0.2" + "version": "1.0.3" }