Fix typing on tuya fan percentage (#46541)

This commit is contained in:
J. Nick Koston 2021-02-14 12:05:31 -10:00 committed by GitHub
parent 7e88487800
commit 12abe5707d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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