Log exceptions in EntityPlatform.async_add_entities (#41730)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Erik Montnemery 2020-10-13 15:35:27 +02:00 committed by GitHub
parent 33b548e247
commit 12a6d10168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,6 +315,13 @@ class EntityPlatform:
self.platform_name, self.platform_name,
timeout, timeout,
) )
except Exception:
self.logger.exception(
"Error adding entities for domain %s with platform %s",
self.domain,
self.platform_name,
)
raise
if self._async_unsub_polling is not None or not any( if self._async_unsub_polling is not None or not any(
entity.should_poll for entity in self.entities.values() entity.should_poll for entity in self.entities.values()