This makes lights smoothly fade from one state to a new state, without the intermediate "turn off"
This commit is contained in:
@@ -284,7 +284,8 @@ class LocaltuyaLight(LocalTuyaEntity, LightEntity):
|
|||||||
async def async_turn_on(self, **kwargs):
|
async def async_turn_on(self, **kwargs):
|
||||||
"""Turn on or control the light."""
|
"""Turn on or control the light."""
|
||||||
states = {}
|
states = {}
|
||||||
states[self._dp_id] = True
|
if not self.is_on:
|
||||||
|
states[self._dp_id] = True
|
||||||
features = self.supported_features
|
features = self.supported_features
|
||||||
brightness = None
|
brightness = None
|
||||||
if ATTR_EFFECT in kwargs and (features & SUPPORT_EFFECT):
|
if ATTR_EFFECT in kwargs and (features & SUPPORT_EFFECT):
|
||||||
|
Reference in New Issue
Block a user