Procházet zdrojové kódy

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

Previous test run was done on wrong file. Test was still failing.
Jason Rumney před 2 roky
rodič
revize
406f37b42d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      custom_components/tuya_local/fan.py

+ 1 - 1
custom_components/tuya_local/fan.py

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