Migrate OpenAI to has entity name (#149301)

This commit is contained in:
Joost Lekkerkerker 2025-07-23 12:58:15 +02:00 committed by GitHub
parent b37273ed33
commit 3dffd74607
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)},