mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Fix flux_led turning on with color or effect (#15472)
This commit is contained in:
committed by
Paulus Schoutsen
parent
864a254071
commit
7d0cc7e26c
@@ -218,6 +218,9 @@ class FluxLight(Light):
|
|||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
"""Turn the specified or all lights on."""
|
"""Turn the specified or all lights on."""
|
||||||
|
if not self.is_on:
|
||||||
|
self._bulb.turnOn()
|
||||||
|
|
||||||
hs_color = kwargs.get(ATTR_HS_COLOR)
|
hs_color = kwargs.get(ATTR_HS_COLOR)
|
||||||
|
|
||||||
if hs_color:
|
if hs_color:
|
||||||
@@ -269,9 +272,6 @@ class FluxLight(Light):
|
|||||||
else:
|
else:
|
||||||
self._bulb.setRgb(*tuple(rgb), brightness=brightness)
|
self._bulb.setRgb(*tuple(rgb), brightness=brightness)
|
||||||
|
|
||||||
if not self.is_on:
|
|
||||||
self._bulb.turnOn()
|
|
||||||
|
|
||||||
def turn_off(self, **kwargs):
|
def turn_off(self, **kwargs):
|
||||||
"""Turn the specified or all lights off."""
|
"""Turn the specified or all lights off."""
|
||||||
self._bulb.turnOff()
|
self._bulb.turnOff()
|
||||||
|
Reference in New Issue
Block a user