mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Lock Netgear api during setup (#66033)
This commit is contained in:
parent
afd0005a31
commit
f9c81dd00b
@ -123,8 +123,9 @@ class NetgearRouter:
|
|||||||
|
|
||||||
async def async_setup(self) -> bool:
|
async def async_setup(self) -> bool:
|
||||||
"""Set up a Netgear router."""
|
"""Set up a Netgear router."""
|
||||||
if not await self.hass.async_add_executor_job(self._setup):
|
async with self._api_lock:
|
||||||
return False
|
if not await self.hass.async_add_executor_job(self._setup):
|
||||||
|
return False
|
||||||
|
|
||||||
# set already known devices to away instead of unavailable
|
# set already known devices to away instead of unavailable
|
||||||
device_registry = dr.async_get(self.hass)
|
device_registry = dr.async_get(self.hass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user