Remove Deconz entity descriptions required fields mixins (#104009)

This commit is contained in:
Franck Nijhof 2023-11-16 16:05:29 +01:00 committed by GitHub
parent b400b33b0d
commit 2c003d8c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 42 deletions

View file

@ -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, ...] = (