From 2650d235eaaf59a30b167ec9b89d9553e4295fc6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 21 Dec 2015 08:56:27 -0800 Subject: [PATCH] Fix: EntityComponent deadlock when adding new devices during update state --- homeassistant/helpers/entity_component.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/helpers/entity_component.py b/homeassistant/helpers/entity_component.py index ec22181bf5a..20be9a0f704 100644 --- a/homeassistant/helpers/entity_component.py +++ b/homeassistant/helpers/entity_component.py @@ -39,7 +39,8 @@ class EntityComponent(object): self.is_polling = False self.config = None - self.lock = Lock() + # Because updating state might cause an entity to be found + self.lock = RLock() def setup(self, config): """