mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix LIFX light turning on while fading off (#78095)
This commit is contained in:
parent
e332091d76
commit
0a143ac596
@ -237,15 +237,10 @@ class LIFXLight(LIFXEntity, LightEntity):
|
|||||||
elif power_on:
|
elif power_on:
|
||||||
await self.set_power(True, duration=fade)
|
await self.set_power(True, duration=fade)
|
||||||
else:
|
else:
|
||||||
|
if power_on:
|
||||||
|
await self.set_power(True)
|
||||||
if hsbk:
|
if hsbk:
|
||||||
await self.set_color(hsbk, kwargs, duration=fade)
|
await self.set_color(hsbk, kwargs, duration=fade)
|
||||||
# The response from set_color will tell us if the
|
|
||||||
# bulb is actually on or not, so we don't need to
|
|
||||||
# call power_on if its already on
|
|
||||||
if power_on and self.bulb.power_level == 0:
|
|
||||||
await self.set_power(True)
|
|
||||||
elif power_on:
|
|
||||||
await self.set_power(True)
|
|
||||||
if power_off:
|
if power_off:
|
||||||
await self.set_power(False, duration=fade)
|
await self.set_power(False, duration=fade)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user