mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Migrate OpenAI to has entity name (#149301)
This commit is contained in:
parent
b37273ed33
commit
3dffd74607
@ -274,11 +274,13 @@ async def _transform_stream(
|
||||
class OpenAIBaseLLMEntity(Entity):
|
||||
"""OpenAI conversation agent."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, entry: OpenAIConfigEntry, subentry: ConfigSubentry) -> None:
|
||||
"""Initialize the entity."""
|
||||
self.entry = entry
|
||||
self.subentry = subentry
|
||||
self._attr_name = subentry.title
|
||||
self._attr_unique_id = subentry.subentry_id
|
||||
self._attr_device_info = dr.DeviceInfo(
|
||||
identifiers={(DOMAIN, subentry.subentry_id)},
|
||||
|
Loading…
x
Reference in New Issue
Block a user