Bump reolink-aio to 0.7.14 and improve typing of Reolink (#103129)

* Improve typing

* fix mypy

* Further improve typing

* Restore Literal typing

* Bump reolink_aio to 0.7.13

* Bump reolink-aio to 0.7.14
This commit is contained in:
starkillerOG 2023-11-03 17:05:27 +01:00 committed by GitHub
parent c1d979dc07
commit 1df69f52e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 37 additions and 29 deletions

View file

@ -32,7 +32,7 @@ from .entity import ReolinkChannelCoordinatorEntity
class ReolinkBinarySensorEntityDescriptionMixin:
"""Mixin values for Reolink binary sensor entities."""
value: Callable[[Host, int | None], bool]
value: Callable[[Host, int], bool]
@dataclass
@ -43,7 +43,7 @@ class ReolinkBinarySensorEntityDescription(
icon: str = "mdi:motion-sensor"
icon_off: str = "mdi:motion-sensor-off"
supported: Callable[[Host, int | None], bool] = lambda host, ch: True
supported: Callable[[Host, int], bool] = lambda host, ch: True
BINARY_SENSORS = (
@ -169,6 +169,6 @@ class ReolinkBinarySensorEntity(ReolinkChannelCoordinatorEntity, BinarySensorEnt
)
)
async def _async_handle_event(self, event):
async def _async_handle_event(self, event: str) -> None:
"""Handle incoming event for motion detection."""
self.async_write_ha_state()