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
|
@ -24,20 +24,12 @@ from .const import DOMAIN
|
|||
from .entity import ReolinkChannelCoordinatorEntity, ReolinkHostCoordinatorEntity
|
||||
|
||||
|
||||
@dataclass
|
||||
class ReolinkSensorEntityDescriptionMixin:
|
||||
"""Mixin values for Reolink sensor entities for a camera channel."""
|
||||
|
||||
value: Callable[[Host, int], int]
|
||||
|
||||
|
||||
@dataclass
|
||||
class ReolinkSensorEntityDescription(
|
||||
SensorEntityDescription, ReolinkSensorEntityDescriptionMixin
|
||||
):
|
||||
@dataclass(kw_only=True)
|
||||
class ReolinkSensorEntityDescription(SensorEntityDescription):
|
||||
"""A class that describes sensor entities for a camera channel."""
|
||||
|
||||
supported: Callable[[Host, int], bool] = lambda api, ch: True
|
||||
value: Callable[[Host, int], int]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue