AqaraGateway icon indicating copy to clipboard operation
AqaraGateway copied to clipboard

M1S light brightness adjust by drag in dashboard error

Open linjt325 opened this issue 3 years ago • 1 comments

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

linjt325 avatar Dec 26 '22 11:12 linjt325

for me too

shummo avatar Jan 09 '23 11:01 shummo