diff --git a/custom_components/tuya_local/fan.py b/custom_components/tuya_local/fan.py index bdec9334ed..c817fbcc15 100644 --- a/custom_components/tuya_local/fan.py +++ b/custom_components/tuya_local/fan.py @@ -117,7 +117,7 @@ def percentage(self): return None r = self._speed_dps.range(self._device) val = self._speed_dps.get_value(self._device) - if r: + if r and val is not None: val = ranged_value_to_percentage(r, val) return val