From 8b97f62a8e0fd309ad3807fff58c13e45a762375 Mon Sep 17 00:00:00 2001 From: Ellis Michael Date: Thu, 18 Feb 2021 09:40:16 -0800 Subject: [PATCH] Allow LIFX bulbs to fade color even when off (#46596) LIFX bulbs have the capability to fade their color attributes even while the bulb is off. When the bulb is later turned on, the fade will continue as if the bulb was on all along. --- homeassistant/components/lifx/light.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/lifx/light.py b/homeassistant/components/lifx/light.py index e775b5623d3..f06a7720bb2 100644 --- a/homeassistant/components/lifx/light.py +++ b/homeassistant/components/lifx/light.py @@ -608,9 +608,13 @@ class LIFXLight(LightEntity): if not self.is_on: if power_off: await self.set_power(ack, False) - if hsbk: + # If fading on with color, set color immediately + if hsbk and power_on: await self.set_color(ack, hsbk, kwargs) - if power_on: + await self.set_power(ack, True, duration=fade) + elif hsbk: + await self.set_color(ack, hsbk, kwargs, duration=fade) + elif power_on: await self.set_power(ack, True, duration=fade) else: if power_on: