diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 47d892ff..ac592efb 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -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,