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.
This commit is contained in:
Ellis Michael
2021-02-18 09:40:16 -08:00
committed by GitHub
parent 3353c63f8f
commit 8b97f62a8e

View File

@@ -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: