Преглед изворни кода

fix(light): cannot modify tuple range, so return a new one

Jason Rumney пре 2 дана
родитељ
комит
ac388f1e87
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      custom_components/tuya_local/light.py

+ 1 - 1
custom_components/tuya_local/light.py

@@ -194,7 +194,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
                 if self._switch_dps is None and r[0] == 0:
                     # If the light has no switch, and the brightness range starts
                     # at 0, the effective minimum brightness is 1
-                    r[0] = self._brightness_dps.step(self._device, False)
+                    return (self._brightness_dps.step(self._device, False), r[1])
                 return r
 
     @property