Remove Deconz entity descriptions required fields mixins (#104009)
This commit is contained in:
parent
b400b33b0d
commit
2c003d8c10
4 changed files with 17 additions and 42 deletions
|
@ -65,24 +65,15 @@ T = TypeVar(
|
|||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class DeconzBinarySensorDescriptionMixin(Generic[T]):
|
||||
"""Required values when describing secondary sensor attributes."""
|
||||
|
||||
update_key: str
|
||||
value_fn: Callable[[T], bool | None]
|
||||
|
||||
|
||||
@dataclass
|
||||
class DeconzBinarySensorDescription(
|
||||
BinarySensorEntityDescription,
|
||||
DeconzBinarySensorDescriptionMixin[T],
|
||||
):
|
||||
@dataclass(kw_only=True)
|
||||
class DeconzBinarySensorDescription(Generic[T], BinarySensorEntityDescription):
|
||||
"""Class describing deCONZ binary sensor entities."""
|
||||
|
||||
instance_check: type[T] | None = None
|
||||
name_suffix: str = ""
|
||||
old_unique_id_suffix: str = ""
|
||||
update_key: str
|
||||
value_fn: Callable[[T], bool | None]
|
||||
|
||||
|
||||
ENTITY_DESCRIPTIONS: tuple[DeconzBinarySensorDescription, ...] = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue