Parcourir la source

cleanup(light): avoid shadowing builtins

Jason Rumney il y a 2 mois
Parent
commit
c321be73ad
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      custom_components/tuya_local/light.py

+ 4 - 4
custom_components/tuya_local/light.py

@@ -69,11 +69,11 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
                     self._attr_max_color_temp_kelvin = tr.get("max")
                     range_set = True
             if not range_set:
-                range = self._color_temp_dps.range(self._device)
-                if range:
+                r = self._color_temp_dps.range(self._device)
+                if r:
                     # For lights that use K natively, use range
-                    self._attr_min_color_temp_kelvin = range[0]
-                    self._attr_max_color_temp_kelvin = range[1]
+                    self._attr_min_color_temp_kelvin = r[0]
+                    self._attr_max_color_temp_kelvin = r[1]
 
     @property
     def supported_color_modes(self):