diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index ed62002a..c24ba059 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1277,8 +1277,10 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): ): # Skip if adaptation was already executed by the service call interceptor _LOGGER.debug( - "%s: Skipping reactive adaptation of %s", + "%s: Skipping reactive adaptation of light %s with context.id=%s and context.parent_id=%s", self._name, + light, + context.id, context.parent_id, ) return @@ -1490,9 +1492,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): ) self.manager.mark_as_manual_control(entity_id) return - # TODO: I believe I need to separate the concept of random turn ons and # noqa: TD002, FIX002, TD003 - # manual control because take_over_control can be False which means that - # manual control is ignored. Or deprecate take_over_contol and make it always True? + if self._adapt_delay > 0: await asyncio.sleep(self._adapt_delay)