mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Merge pull request #689 from happyleavesaoc/limitlessled_off_transition_fix
LimitlessLED off->off transition fix
This commit is contained in:
commit
5e2641e288
@ -90,8 +90,8 @@ def state(new_state):
|
|||||||
if self.repeating:
|
if self.repeating:
|
||||||
self.repeating = False
|
self.repeating = False
|
||||||
self.group.stop()
|
self.group.stop()
|
||||||
# Not on? Turn on.
|
# Not on and should be? Turn on.
|
||||||
if not self.is_on:
|
if not self.is_on and new_state is True:
|
||||||
pipeline.on()
|
pipeline.on()
|
||||||
# Set transition time.
|
# Set transition time.
|
||||||
if ATTR_TRANSITION in kwargs:
|
if ATTR_TRANSITION in kwargs:
|
||||||
@ -151,7 +151,8 @@ class LimitlessLEDGroup(Light):
|
|||||||
@state(False)
|
@state(False)
|
||||||
def turn_off(self, transition_time, pipeline, **kwargs):
|
def turn_off(self, transition_time, pipeline, **kwargs):
|
||||||
""" Turn off a group. """
|
""" Turn off a group. """
|
||||||
pipeline.transition(transition_time, brightness=0.0).off()
|
if self.is_on:
|
||||||
|
pipeline.transition(transition_time, brightness=0.0).off()
|
||||||
|
|
||||||
|
|
||||||
class LimitlessLEDWhiteGroup(LimitlessLEDGroup):
|
class LimitlessLEDWhiteGroup(LimitlessLEDGroup):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user