From 1193f4d1024e2168ea2dcdefc3e067f9adf9a368 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Thu, 10 Aug 2023 13:14:54 -0700 Subject: [PATCH] remove logging call and use hass.async_create_task --- custom_components/adaptive_lighting/switch.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 2b14777b..ad23253c 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1299,7 +1299,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): service_data, context=data.context, ) - _LOGGER.debug("%s: 'light.turn_on' awaited", self._name) async def execute_cancellable_adaptation_calls( self, @@ -2015,7 +2014,7 @@ class AdaptiveLightingManager: # Don't await to avoid blocking the service call. # Assign to a variable only to await in tests. self.adaptation_tasks.add( - asyncio.create_task( + self.hass.async_create_task( switch.execute_cancellable_adaptation_calls(adaptation_data), ), )