mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
check
This commit is contained in:
parent
caf9c410e8
commit
f51c3517b9
1 changed files with 3 additions and 4 deletions
|
|
@ -2356,11 +2356,10 @@ class AdaptiveLightingManager:
|
|||
# Skip resetting here because `_service_interceptor_turn_on_handler`
|
||||
# ran *just* before this and already reset the light and populated
|
||||
# `self.last_service_data` with the new data.
|
||||
if event.context.parent_id and not self.is_proactively_adapting(
|
||||
event.context.id,
|
||||
):
|
||||
self.reset(entity_id, reset_manual_control=False)
|
||||
if self.is_proactively_adapting(event.context.id):
|
||||
_LOGGER.debug("We should cancel here?")
|
||||
else:
|
||||
self.reset(entity_id, reset_manual_control=False)
|
||||
lock = self.turn_off_locks.setdefault(entity_id, asyncio.Lock())
|
||||
async with lock:
|
||||
if await self.just_turned_off(entity_id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue