Merge pull request #240 from maartenweyns/master

Fix light state change when already on
This commit is contained in:
ultratoto14
2020-12-15 22:55:21 +01:00
committed by GitHub

View File

@@ -284,6 +284,7 @@ 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 = {}
if not self.is_on:
states[self._dp_id] = True states[self._dp_id] = True
features = self.supported_features features = self.supported_features
brightness = None brightness = None