mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Minor typing adjustment in entity_platform (#92978)
This commit is contained in:
parent
93bfd7d8d0
commit
30f52b8d96
@ -622,10 +622,12 @@ class EntityPlatform:
|
||||
except RequiredParameterMissing:
|
||||
pass
|
||||
|
||||
if entity.entity_id is not None:
|
||||
# An entity may suggest the entity_id by setting entity_id itself
|
||||
suggested_entity_id: str | None = entity.entity_id
|
||||
if suggested_entity_id is not None:
|
||||
suggested_object_id = split_entity_id(entity.entity_id)[1]
|
||||
else:
|
||||
if device and entity.has_entity_name: # type: ignore[unreachable]
|
||||
if device and entity.has_entity_name:
|
||||
device_name = device.name_by_user or device.name
|
||||
if not entity.name:
|
||||
suggested_object_id = device_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user