Public Access
Fix ha 2025.2 issue related to proxies
This commit is contained in:
@@ -6,6 +6,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.const import CONF_API_KEY, Platform
|
from homeassistant.const import CONF_API_KEY, Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
|
from homeassistant.helpers.httpx_client import get_async_client
|
||||||
|
|
||||||
from .const import LOGGER
|
from .const import LOGGER
|
||||||
|
|
||||||
@@ -19,7 +20,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: GroqConfigEntry) -> bool
|
|||||||
|
|
||||||
LOGGER.info("Setting up %s", entry)
|
LOGGER.info("Setting up %s", entry)
|
||||||
|
|
||||||
client = groq.AsyncGroq(api_key=entry.data[CONF_API_KEY])
|
client = groq.AsyncGroq(
|
||||||
|
api_key=entry.data[CONF_API_KEY],
|
||||||
|
http_client=get_async_client(hass)
|
||||||
|
)
|
||||||
|
|
||||||
# TODO: I get async errors when trying to call the list function. But this would be the proper way to validate the API key.
|
# TODO: I get async errors when trying to call the list function. But this would be the proper way to validate the API key.
|
||||||
# try:
|
# try:
|
||||||
|
|||||||
Reference in New Issue
Block a user