Update typing 14 (#48078)

This commit is contained in:
Marc Mueller 2021-03-18 15:08:35 +01:00 committed by GitHub
parent 7d196abc4a
commit dcca29ef68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 614 additions and 521 deletions

View file

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