mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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."""
|
"""Support for Tuya fans."""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from homeassistant.components.fan import (
|
from homeassistant.components.fan import (
|
||||||
DOMAIN as SENSOR_DOMAIN,
|
DOMAIN as SENSOR_DOMAIN,
|
||||||
@ -116,7 +117,7 @@ class TuyaFanDevice(TuyaDevice, FanEntity):
|
|||||||
return self._tuya.state()
|
return self._tuya.state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def percentage(self) -> str:
|
def percentage(self) -> Optional[int]:
|
||||||
"""Return the current speed."""
|
"""Return the current speed."""
|
||||||
if not self.is_on:
|
if not self.is_on:
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user