mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Instantiate lock inside event loop (#24203)
This commit is contained in:
parent
8fe1a84db2
commit
440e4289e4
@ -45,7 +45,7 @@ class EntityPlatform:
|
|||||||
self._async_unsub_polling = None
|
self._async_unsub_polling = None
|
||||||
# Method to cancel the retry of setup
|
# Method to cancel the retry of setup
|
||||||
self._async_cancel_retry_setup = None
|
self._async_cancel_retry_setup = None
|
||||||
self._process_updates = asyncio.Lock()
|
self._process_updates = None
|
||||||
|
|
||||||
# Platform is None for the EntityComponent "catch-all" EntityPlatform
|
# Platform is None for the EntityComponent "catch-all" EntityPlatform
|
||||||
# which powers entity_component.add_entities
|
# which powers entity_component.add_entities
|
||||||
@ -404,6 +404,8 @@ class EntityPlatform:
|
|||||||
|
|
||||||
This method must be run in the event loop.
|
This method must be run in the event loop.
|
||||||
"""
|
"""
|
||||||
|
if self._process_updates is None:
|
||||||
|
self._process_updates = asyncio.Lock()
|
||||||
if self._process_updates.locked():
|
if self._process_updates.locked():
|
||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
"Updating %s %s took longer than the scheduled update "
|
"Updating %s %s took longer than the scheduled update "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user