mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Fix platform discovery when platform discovered during discovery of a (#4529)
component
This commit is contained in:
parent
5d18759146
commit
c81735cc84
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user