This commit is contained in:
Home Assistant Version Control
2026-07-27 17:07:54 +00:00
parent 854575c99b
commit 81e5034586
19 changed files with 14 additions and 4 deletions
+12 -2
View File
@@ -504,13 +504,23 @@ class MideaACClimate(MideaClimate):
@property
def fan_modes(self) -> list[str] | None:
"""fan_modes restricted to the speeds the device reports (B5).
"""fan_modes: B5 capabilities > default full set.
Falls back to the full set when no capability is reported.
Read dynamically so capabilities decoded after the first refresh are
reflected (they are not yet available when the entity is created).
The B5 ``b5_wind_speed`` byte is a single capability profile (1-7), not
a bitmask: value 1 (``fan_custom``) means the fan is stepless/inverter
and accepts every speed, so all discrete modes are valid. Mapping
``fan_custom`` to ``full`` alone collapsed the list to ``["full"]`` on
such units (issue #904); short-circuit to the full set instead.
"""
caps = getattr(self._device, "capabilities", {})
if not caps:
return list(self._fan_speeds.keys())
# stepless/inverter fan: expose every discrete speed, not just "full"
if caps.get("fan_custom"):
return list(self._fan_speeds.keys())
cap_by_fan = {
FAN_SILENT: "fan_silent",
FAN_LOW: "fan_low",
+2 -2
View File
@@ -9,6 +9,6 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/wuwentao/midea_ac_lan/issues",
"loggers": ["midealocal"],
"requirements": ["midea-local==6.11.0"],
"version": "0.7.0"
"requirements": ["midea-local==6.11.1"],
"version": "0.7.1"
}