mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
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:
parent
3353c63f8f
commit
8b97f62a8e
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user