From 97bb2cf3debcba39cbfab76e27357dba531681da Mon Sep 17 00:00:00 2001 From: Mark Niemeyer <64665067+Mark-Niemeyer@users.noreply.github.com> Date: Sun, 27 Nov 2022 19:29:10 +0100 Subject: [PATCH] use send_split_delay also when no transition is used --- custom_components/adaptive_lighting/switch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 500154be..e2dee95f 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -874,7 +874,8 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): if len(service_datas) == 2: transition = service_datas[0].get(ATTR_TRANSITION) if transition is not None: - await asyncio.sleep(transition + self._send_split_delay / 1000.0) + await asyncio.sleep(transition) + await asyncio.sleep(self._send_split_delay / 1000.0) await turn_on(service_datas[1]) async def _update_attrs_and_maybe_adapt_lights(