Assign device_entry earlier in entity platform (#160767)

This commit is contained in:
Artur Pragacz
2026-01-12 10:49:01 +01:00
committed by GitHub
parent 8460d4f5e2
commit 1b9364e8b5

View File

@@ -864,6 +864,8 @@ class EntityPlatform:
)
entity.add_to_platform_abort()
return
entity.device_entry = device
else:
device = entity.device_entry
else:
@@ -924,8 +926,6 @@ class EntityPlatform:
)
entity.registry_entry = entry
if device:
entity.device_entry = device
entity.entity_id = entry.entity_id
else: # entity.unique_id is None