Update typing 14 (#48078)
This commit is contained in:
parent
7d196abc4a
commit
dcca29ef68
73 changed files with 614 additions and 521 deletions
|
@ -1,6 +1,5 @@
|
|||
"""Support for WiLight Fan."""
|
||||
|
||||
from typing import Optional
|
||||
from __future__ import annotations
|
||||
|
||||
from pywilight.const import (
|
||||
FAN_V1,
|
||||
|
@ -79,7 +78,7 @@ class WiLightFan(WiLightDevice, FanEntity):
|
|||
return self._status.get("direction", WL_DIRECTION_OFF) != WL_DIRECTION_OFF
|
||||
|
||||
@property
|
||||
def percentage(self) -> Optional[int]:
|
||||
def percentage(self) -> int | None:
|
||||
"""Return the current speed percentage."""
|
||||
if "direction" in self._status:
|
||||
if self._status["direction"] == WL_DIRECTION_OFF:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue