Bladeren bron

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

Jason Rumney 3 dagen geleden
bovenliggende
commit
ac388f1e87
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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 self._switch_dps is None and r[0] == 0:
                     # If the light has no switch, and the brightness range starts
                     # If the light has no switch, and the brightness range starts
                     # at 0, the effective minimum brightness is 1
                     # 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
                 return r
 
 
     @property
     @property