mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
use locks
This commit is contained in:
parent
297539adda
commit
37f110f5d1
1 changed files with 1 additions and 1 deletions
|
|
@ -569,7 +569,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
)
|
||||
lock = self._locks.get(entity_id)
|
||||
if lock is None:
|
||||
lock = asyncio.Lock()
|
||||
lock = self._locks[entity_id] = asyncio.Lock()
|
||||
async with lock:
|
||||
if await self.turn_on_off_listener.maybe_cancel_adjusting(
|
||||
entity_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue