fix brightness

This commit is contained in:
Andrey
2020-12-30 08:58:57 +03:00
parent 577119e41a
commit a958d56e6b

View File

@@ -119,7 +119,7 @@ class MegaLight(LightEntity, BaseMegaEntity):
return self._state == 'ON'
async def async_turn_on(self, brightness=None, **kwargs) -> None:
brightness = brightness or self.brightness
brightness = brightness or self.brightness or 255
if self.dimmer and brightness == 0:
cmd = 255
elif self.dimmer: