mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Migrate Anthropic to has entity name (#149302)
This commit is contained in:
parent
3dffd74607
commit
eb8ca53a03
@ -311,11 +311,13 @@ def _create_token_stats(
|
|||||||
class AnthropicBaseLLMEntity(Entity):
|
class AnthropicBaseLLMEntity(Entity):
|
||||||
"""Anthropic base LLM entity."""
|
"""Anthropic base LLM entity."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, entry: AnthropicConfigEntry, subentry: ConfigSubentry) -> None:
|
def __init__(self, entry: AnthropicConfigEntry, subentry: ConfigSubentry) -> None:
|
||||||
"""Initialize the entity."""
|
"""Initialize the entity."""
|
||||||
self.entry = entry
|
self.entry = entry
|
||||||
self.subentry = subentry
|
self.subentry = subentry
|
||||||
self._attr_name = subentry.title
|
|
||||||
self._attr_unique_id = subentry.subentry_id
|
self._attr_unique_id = subentry.subentry_id
|
||||||
self._attr_device_info = dr.DeviceInfo(
|
self._attr_device_info = dr.DeviceInfo(
|
||||||
identifiers={(DOMAIN, subentry.subentry_id)},
|
identifiers={(DOMAIN, subentry.subentry_id)},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user