From 12a6d10168719f1b017ebc56a95fa06f19414204 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 13 Oct 2020 15:35:27 +0200 Subject: [PATCH] Log exceptions in EntityPlatform.async_add_entities (#41730) Co-authored-by: J. Nick Koston Co-authored-by: Martin Hjelmare --- homeassistant/helpers/entity_platform.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index c971fa1ceb5..777af5f013a 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -315,6 +315,13 @@ class EntityPlatform: self.platform_name, 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( entity.should_poll for entity in self.entities.values()