mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Store config entry id in entity registry (#14851)
* Store config entry id in entity registry * Lint
This commit is contained in:
committed by
Pascal Vizeli
parent
bb4d1773d3
commit
67d137cfd5
@@ -260,9 +260,15 @@ class EntityPlatform(object):
|
||||
suggested_object_id = '{} {}'.format(
|
||||
self.entity_namespace, suggested_object_id)
|
||||
|
||||
if self.config_entry is not None:
|
||||
config_entry_id = self.config_entry.entry_id
|
||||
else:
|
||||
config_entry_id = None
|
||||
|
||||
entry = registry.async_get_or_create(
|
||||
self.domain, self.platform_name, entity.unique_id,
|
||||
suggested_object_id=suggested_object_id)
|
||||
suggested_object_id=suggested_object_id,
|
||||
config_entry_id=config_entry_id)
|
||||
|
||||
if entry.disabled:
|
||||
self.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user