4
0
Эх сурвалжийг харах

fan: fix further issue when turning off with 0 speed.

Previous test run was done on wrong file. Test was still failing.
Jason Rumney 2 жил өмнө
parent
commit
406f37b42d

+ 1 - 1
custom_components/tuya_local/fan.py

@@ -107,7 +107,7 @@ class TuyaLocalFan(TuyaLocalEntity, FanEntity):
         """Set the fan speed as a percentage."""
         # If speed is 0, turn the fan off
         if percentage == 0 and self._switch_dps:
-            return self.async_turn_off(self)
+            return await self.async_turn_off()
 
         if self._speed_dps is None:
             return None