From 67c4f35b4801d83e14c8f4211528315293025f65 Mon Sep 17 00:00:00 2001
From: IATkachenko <IATkachenko@gmail.com>
Date: Sat, 6 Jan 2024 19:21:32 +0300
Subject: [PATCH] fix: object of type 'property' has no len()

---
 custom_components/ha_tion_btle/fan.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/custom_components/ha_tion_btle/fan.py b/custom_components/ha_tion_btle/fan.py
index a9cb26c..2aeb459 100644
--- a/custom_components/ha_tion_btle/fan.py
+++ b/custom_components/ha_tion_btle/fan.py
@@ -44,7 +44,7 @@ class TionFan(FanEntity, CoordinatorEntity):
     _attr_supported_features = FanEntityFeature.PRESET_MODE | FanEntityFeature.SET_SPEED
     _attr_oscillating = False
     _attr_preset_modes = [PRESET_NONE, PRESET_BOOST]
-    _attr_speed_count = len(TionClimateEntity.attr_fan_modes())
+    _attr_speed_count = 6  # Must be synced with TionClimateEntity._attr_fan_modes
     _attr_current_direction = DIRECTION_FORWARD
     _mode_percent_mapping = {
         0: 0,