Remove Reolink entity descriptions required fields mixins (#104006)

This commit is contained in:
Franck Nijhof 2023-11-15 09:16:47 +01:00 committed by GitHub
parent 880483624b
commit 2d36225405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 107 deletions

View file

@ -28,22 +28,14 @@ from .const import DOMAIN
from .entity import ReolinkChannelCoordinatorEntity
@dataclass
class ReolinkBinarySensorEntityDescriptionMixin:
"""Mixin values for Reolink binary sensor entities."""
value: Callable[[Host, int], bool]
@dataclass
class ReolinkBinarySensorEntityDescription(
BinarySensorEntityDescription, ReolinkBinarySensorEntityDescriptionMixin
):
@dataclass(kw_only=True)
class ReolinkBinarySensorEntityDescription(BinarySensorEntityDescription):
"""A class that describes binary sensor entities."""
icon: str = "mdi:motion-sensor"
icon_off: str = "mdi:motion-sensor-off"
icon: str = "mdi:motion-sensor"
supported: Callable[[Host, int], bool] = lambda host, ch: True
value: Callable[[Host, int], bool]
BINARY_SENSORS = (