From 2c5da6d73954e0ff3808b61092adbe55cdec1bb4 Mon Sep 17 00:00:00 2001 From: Benjamin Auquite Date: Sat, 8 Apr 2023 06:19:53 -0500 Subject: [PATCH] remove unnecessary create_task --- custom_components/adaptive_lighting/switch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index bcc90422..491ca462 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1276,9 +1276,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): ) continue tasks.append( - asyncio.create_task( - self._adapt_light(light, transition, force=force, context=context) - ) + self._adapt_light(light, transition, force=force, context=context) ) if len(tasks): await asyncio.gather(*tasks)