mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Migrate Ollama to has entity name (#149303)
This commit is contained in:
parent
edf6166a9f
commit
dcf29d12a7
@ -170,11 +170,13 @@ async def _transform_stream(
|
||||
class OllamaBaseLLMEntity(Entity):
|
||||
"""Ollama base LLM entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, entry: OllamaConfigEntry, subentry: ConfigSubentry) -> None:
|
||||
"""Initialize the entity."""
|
||||
self.entry = entry
|
||||
self.subentry = subentry
|
||||
self._attr_name = subentry.title
|
||||
self._attr_unique_id = subentry.subentry_id
|
||||
|
||||
model, _, version = subentry.data[CONF_MODEL].partition(":")
|
||||
|
@ -619,7 +619,6 @@ async def test_conversation_agent(
|
||||
assert entity_entry
|
||||
subentry = mock_config_entry.subentries.get(entity_entry.unique_id)
|
||||
assert subentry
|
||||
assert entity_entry.original_name == subentry.title
|
||||
|
||||
device_entry = device_registry.async_get(entity_entry.device_id)
|
||||
assert device_entry
|
||||
|
Loading…
x
Reference in New Issue
Block a user