diff --git a/custom_components/localtuya/fan.py b/custom_components/localtuya/fan.py index 59c33acf0..c8375f9d3 100644 --- a/custom_components/localtuya/fan.py +++ b/custom_components/localtuya/fan.py @@ -208,6 +208,8 @@ def supported_features(self) -> FanEntityFeature: @property def speed_count(self) -> int: """Speed count for the fan.""" + if self._use_ordered_list: + return len(self._ordered_list) speed_count = int_states_in_range(self._speed_range) _LOGGER.debug("Fan speed_count: %s", speed_count) return speed_count