Store config entry id in entity registry (#14851)

* Store config entry id in entity registry

* Lint
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-06-07 20:23:09 +02:00
1 parent bb4d1773d3
commit 67d137cfd5
4 files changed
+31 -8

No files matched your search

+7 -1
View File
@@ -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(