mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix typing on tuya fan percentage (#46541)
This commit is contained in:
parent
7e88487800
commit
12abe5707d
@ -1,5 +1,6 @@
|
||||
"""Support for Tuya fans."""
|
||||
from datetime import timedelta
|
||||
from typing import Optional
|
||||
|
||||
from homeassistant.components.fan import (
|
||||
DOMAIN as SENSOR_DOMAIN,
|
||||
@ -116,7 +117,7 @@ class TuyaFanDevice(TuyaDevice, FanEntity):
|
||||
return self._tuya.state()
|
||||
|
||||
@property
|
||||
def percentage(self) -> str:
|
||||
def percentage(self) -> Optional[int]:
|
||||
"""Return the current speed."""
|
||||
if not self.is_on:
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user