Update typing 09 (#48059)
This commit is contained in:
parent
2ab640aaef
commit
283b4abe67
39 changed files with 239 additions and 196 deletions
|
@ -1,6 +1,8 @@
|
|||
"""Support for ISY994 fans."""
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
from typing import Callable, Optional
|
||||
from typing import Callable
|
||||
|
||||
from pyisy.constants import ISY_VALUE_UNKNOWN, PROTO_INSTEON
|
||||
|
||||
|
@ -43,7 +45,7 @@ class ISYFanEntity(ISYNodeEntity, FanEntity):
|
|||
"""Representation of an ISY994 fan device."""
|
||||
|
||||
@property
|
||||
def percentage(self) -> Optional[int]:
|
||||
def percentage(self) -> int | None:
|
||||
"""Return the current speed percentage."""
|
||||
if self._node.status == ISY_VALUE_UNKNOWN:
|
||||
return None
|
||||
|
@ -97,7 +99,7 @@ class ISYFanProgramEntity(ISYProgramEntity, FanEntity):
|
|||
"""Representation of an ISY994 fan program."""
|
||||
|
||||
@property
|
||||
def percentage(self) -> Optional[int]:
|
||||
def percentage(self) -> int | None:
|
||||
"""Return the current speed percentage."""
|
||||
if self._node.status == ISY_VALUE_UNKNOWN:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue