From b75aa7eb3a41015264ab2ce18623a9bd62726ca4 Mon Sep 17 00:00:00 2001 From: brefra Date: Sat, 4 Jan 2020 00:01:37 +0100 Subject: [PATCH] Fix async call inside sync context (#30458) * Fix async call inside sync context * Apply black formatting --- homeassistant/components/velbus/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/velbus/__init__.py b/homeassistant/components/velbus/__init__.py index de48f846540..8e00bc3fee5 100644 --- a/homeassistant/components/velbus/__init__.py +++ b/homeassistant/components/velbus/__init__.py @@ -67,9 +67,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry): hass.data[DOMAIN][entry.entry_id] = discovery_info for category in COMPONENT_TYPES: - hass.async_create_task( - hass.config_entries.async_forward_entry_setup(entry, category) - ) + hass.add_job(hass.config_entries.async_forward_entry_setup(entry, category)) try: controller = velbus.Controller(entry.data[CONF_PORT])