Remove invalid type definitions in zha (#73596)

This commit is contained in:
epenet 2022-06-20 11:28:53 +02:00 committed by GitHub
parent 120479acef
commit 06e45893aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 135 additions and 132 deletions

View file

@ -78,6 +78,7 @@ from .helpers import LogMixin, async_get_zha_config_value
if TYPE_CHECKING:
from ..api import ClusterBinding
from .gateway import ZHAGateway
_LOGGER = logging.getLogger(__name__)
_UPDATE_ALIVE_INTERVAL = (60, 90)
@ -100,7 +101,7 @@ class ZHADevice(LogMixin):
self,
hass: HomeAssistant,
zigpy_device: zha_typing.ZigpyDeviceType,
zha_gateway: zha_typing.ZhaGatewayType,
zha_gateway: ZHAGateway,
) -> None:
"""Initialize the gateway."""
self.hass = hass
@ -155,12 +156,12 @@ class ZHADevice(LogMixin):
return self._zigpy_device
@property
def channels(self) -> zha_typing.ChannelsType:
def channels(self) -> channels.Channels:
"""Return ZHA channels."""
return self._channels
@channels.setter
def channels(self, value: zha_typing.ChannelsType) -> None:
def channels(self, value: channels.Channels) -> None:
"""Channels setter."""
assert isinstance(value, channels.Channels)
self._channels = value
@ -332,7 +333,7 @@ class ZHADevice(LogMixin):
cls,
hass: HomeAssistant,
zigpy_dev: zha_typing.ZigpyDeviceType,
gateway: zha_typing.ZhaGatewayType,
gateway: ZHAGateway,
restored: bool = False,
):
"""Create new device."""