From c81735cc84c039e103a8ae6597005954c9fea32c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 22 Nov 2016 08:21:08 -0800 Subject: [PATCH] Fix platform discovery when platform discovered during discovery of a (#4529) component --- homeassistant/helpers/discovery.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 051d07b2435..de16a0b907d 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -151,11 +151,10 @@ def async_load_platform(hass, component, platform, discovered=None, This method is a coroutine. """ did_lock = False - if component not in hass.config.components: - setup_lock = hass.data.get('setup_lock') - if setup_lock and setup_lock.locked(): - did_lock = True - yield from setup_lock.acquire() + setup_lock = hass.data.get('setup_lock') + if setup_lock and setup_lock.locked(): + did_lock = True + yield from setup_lock.acquire() setup_success = True