mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix async call inside sync context (#30458)
* Fix async call inside sync context * Apply black formatting
This commit is contained in:
parent
b9aba30a6e
commit
b75aa7eb3a
@ -67,9 +67,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|||||||
hass.data[DOMAIN][entry.entry_id] = discovery_info
|
hass.data[DOMAIN][entry.entry_id] = discovery_info
|
||||||
|
|
||||||
for category in COMPONENT_TYPES:
|
for category in COMPONENT_TYPES:
|
||||||
hass.async_create_task(
|
hass.add_job(hass.config_entries.async_forward_entry_setup(entry, category))
|
||||||
hass.config_entries.async_forward_entry_setup(entry, category)
|
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
controller = velbus.Controller(entry.data[CONF_PORT])
|
controller = velbus.Controller(entry.data[CONF_PORT])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user