diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index b9392791f2..a18e159ed6 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -153,7 +153,7 @@ def _white_brightness(self): if self._brightness_dps: r = self._brightness_dps.range(self._device) val = self._brightness_dps.get_value(self._device) - if r: + if r and val is not None: val = color_util.value_to_brightness(r, val) return val