1 """The Ollama integration."""
3 from __future__
import annotations
28 _LOGGER = logging.getLogger(__name__)
40 CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
41 PLATFORMS = (Platform.CONVERSATION,)
45 """Set up Ollama from a config entry."""
46 settings = {**entry.data, **entry.options}
49 async
with asyncio.timeout(DEFAULT_TIMEOUT):
51 except (TimeoutError, httpx.ConnectError)
as err:
54 hass.data.setdefault(DOMAIN, {})[entry.entry_id] = client
56 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
62 if not await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
64 hass.data[DOMAIN].pop(entry.entry_id)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
ssl.SSLContext get_default_context()