AqaraGateway
AqaraGateway copied to clipboard
M1S light brightness adjust by drag in dashboard error
while adjust the brightness of M1s light by dragging slide bar, the brightness_pct is not equal to the value where the pointer point at.
for example: when i drag slide bar to 10, the final brightness value is 3
in file light.py:136 the light brightness have been calculate to brightness percent value.
def turn_on(self, **kwargs):
"""Turn the light on."""
payload = {}
if ATTR_BRIGHTNESS in kwargs:
self._attr_brightness = int(kwargs[ATTR_BRIGHTNESS] / 255.0 * 100.0)
payload[ATTR_BRIGHTNESS] = self._attr_brightness
for me too