Add default title to migrated Ollama entry (#147599)

This commit is contained in:
Joost Lekkerkerker 2025-06-26 17:05:26 +02:00 committed by GitHub
parent 68924d23ab
commit 01205f8a14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ from .const import (
CONF_NUM_CTX, CONF_NUM_CTX,
CONF_PROMPT, CONF_PROMPT,
CONF_THINK, CONF_THINK,
DEFAULT_NAME,
DEFAULT_TIMEOUT, DEFAULT_TIMEOUT,
DOMAIN, DOMAIN,
) )
@ -138,6 +139,7 @@ async def async_migrate_integration(hass: HomeAssistant) -> None:
else: else:
hass.config_entries.async_update_entry( hass.config_entries.async_update_entry(
entry, entry,
title=DEFAULT_NAME,
options={}, options={},
version=2, version=2,
) )

View File

@ -2,6 +2,8 @@
DOMAIN = "ollama" DOMAIN = "ollama"
DEFAULT_NAME = "Ollama"
CONF_MODEL = "model" CONF_MODEL = "model"
CONF_PROMPT = "prompt" CONF_PROMPT = "prompt"
CONF_THINK = "think" CONF_THINK = "think"