From 12abe5707d549cc07934271be29d381c0babdee1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 14 Feb 2021 12:05:31 -1000 Subject: [PATCH] Fix typing on tuya fan percentage (#46541) --- homeassistant/components/tuya/fan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tuya/fan.py b/homeassistant/components/tuya/fan.py index b13b7c3602c..12e963f05d3 100644 --- a/homeassistant/components/tuya/fan.py +++ b/homeassistant/components/tuya/fan.py @@ -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