Remove entity description mixin in Yalexs BLE (#112974)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:51:45 +01:00 committed by GitHub
parent 2b8f42be39
commit ea300623f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,20 +28,13 @@ from .entity import YALEXSBLEEntity
from .models import YaleXSBLEData from .models import YaleXSBLEData
@dataclass(frozen=True) @dataclass(frozen=True, kw_only=True)
class YaleXSBLERequiredKeysMixin: class YaleXSBLESensorEntityDescription(SensorEntityDescription):
"""Mixin for required keys.""" """Describes Yale Access Bluetooth sensor entity."""
value_fn: Callable[[LockState, LockInfo, ConnectionInfo], int | float | None] value_fn: Callable[[LockState, LockInfo, ConnectionInfo], int | float | None]
@dataclass(frozen=True)
class YaleXSBLESensorEntityDescription(
SensorEntityDescription, YaleXSBLERequiredKeysMixin
):
"""Describes Yale Access Bluetooth sensor entity."""
SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = ( SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = (
YaleXSBLESensorEntityDescription( YaleXSBLESensorEntityDescription(
key="", # No key for the original RSSI sensor unique id key="", # No key for the original RSSI sensor unique id