Fix a problem with set_speed(off) when direct HA API for set speed is called (#39488)
This commit is contained in:
1 parent
e1c7c3fdb2
commit
b71cbd2033
2 files changed
+25
No files matched your search
@@ -102,6 +102,10 @@ class BondFan(BondEntity, FanEntity):
|
||||
"""Set the desired speed for the fan."""
|
||||
_LOGGER.debug("async_set_speed called with speed %s", speed)
|
||||
|
||||
if speed == SPEED_OFF:
|
||||
await self.async_turn_off()
|
||||
return
|
||||
|
||||
max_speed = self._device.props.get("max_speed", 3)
|
||||
if speed == SPEED_LOW:
|
||||
bond_speed = 1
|
||||
|
||||
Reference in new issue
Block a user