diff --git a/homeassistant/components/rdw/binary_sensor.py b/homeassistant/components/rdw/binary_sensor.py index 16a93485b36..96311266db4 100644 --- a/homeassistant/components/rdw/binary_sensor.py +++ b/homeassistant/components/rdw/binary_sensor.py @@ -23,20 +23,13 @@ from homeassistant.helpers.update_coordinator import ( from .const import DOMAIN -@dataclass -class RDWBinarySensorEntityDescriptionMixin: - """Mixin for required keys.""" +@dataclass(kw_only=True) +class RDWBinarySensorEntityDescription(BinarySensorEntityDescription): + """Describes RDW binary sensor entity.""" is_on_fn: Callable[[Vehicle], bool | None] -@dataclass -class RDWBinarySensorEntityDescription( - BinarySensorEntityDescription, RDWBinarySensorEntityDescriptionMixin -): - """Describes RDW binary sensor entity.""" - - BINARY_SENSORS: tuple[RDWBinarySensorEntityDescription, ...] = ( RDWBinarySensorEntityDescription( key="liability_insured", diff --git a/homeassistant/components/rdw/sensor.py b/homeassistant/components/rdw/sensor.py index f330ac16b8e..d25c23c09bd 100644 --- a/homeassistant/components/rdw/sensor.py +++ b/homeassistant/components/rdw/sensor.py @@ -24,20 +24,13 @@ from homeassistant.helpers.update_coordinator import ( from .const import CONF_LICENSE_PLATE, DOMAIN -@dataclass -class RDWSensorEntityDescriptionMixin: - """Mixin for required keys.""" +@dataclass(kw_only=True) +class RDWSensorEntityDescription(SensorEntityDescription): + """Describes RDW sensor entity.""" value_fn: Callable[[Vehicle], date | str | float | None] -@dataclass -class RDWSensorEntityDescription( - SensorEntityDescription, RDWSensorEntityDescriptionMixin -): - """Describes RDW sensor entity.""" - - SENSORS: tuple[RDWSensorEntityDescription, ...] = ( RDWSensorEntityDescription( key="apk_expiration",