mirror of
https://github.com/sudoxreboot/groqd
synced 2026-04-14 11:36:49 +00:00
Fix AsyncClient init in executor
This commit is contained in:
parent
3f52a4fcc4
commit
595c3ba9cf
1 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,9 @@ type GroqdConfigEntry = ConfigEntry[GroqdRuntimeData]
|
|||
async def async_setup_entry(hass: HomeAssistant, entry: GroqdConfigEntry) -> bool:
|
||||
"""Set up groqd from a config entry."""
|
||||
api_key = entry.data[CONF_API_KEY]
|
||||
client = await hass.async_add_executor_job(groq.AsyncClient, api_key=api_key)
|
||||
client = await hass.async_add_executor_job(
|
||||
lambda: groq.AsyncClient(api_key=api_key)
|
||||
)
|
||||
entry.runtime_data = GroqdRuntimeData(client=client)
|
||||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
|
|
|
|||
Loading…
Reference in a new issue