Remove Reolink entity descriptions required fields mixins (#104006)
This commit is contained in:
parent
880483624b
commit
2d36225405
7 changed files with 37 additions and 107 deletions
|
@ -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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue