Store config entry id in entity registry (#14851)

* Store config entry id in entity registry

* Lint
This commit is contained in:
Paulus Schoutsen 2018-06-07 14:23:09 -04:00 committed by Pascal Vizeli
parent bb4d1773d3
commit 67d137cfd5
4 changed files with 31 additions and 8 deletions

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(