diff --git a/homeassistant/components/wled/number.py b/homeassistant/components/wled/number.py index 9fb18d3e113..9ab5554a6b7 100644 --- a/homeassistant/components/wled/number.py +++ b/homeassistant/components/wled/number.py @@ -39,18 +39,13 @@ async def async_setup_entry( update_segments() -@dataclass -class WLEDNumberDescriptionMixin: - """Mixin for WLED number.""" +@dataclass(kw_only=True) +class WLEDNumberEntityDescription(NumberEntityDescription): + """Class describing WLED number entities.""" value_fn: Callable[[Segment], float | None] -@dataclass -class WLEDNumberEntityDescription(NumberEntityDescription, WLEDNumberDescriptionMixin): - """Class describing WLED number entities.""" - - NUMBERS = [ WLEDNumberEntityDescription( key=ATTR_SPEED, diff --git a/homeassistant/components/wled/sensor.py b/homeassistant/components/wled/sensor.py index 7d1431c093b..64cc3dc2812 100644 --- a/homeassistant/components/wled/sensor.py +++ b/homeassistant/components/wled/sensor.py @@ -31,20 +31,12 @@ from .coordinator import WLEDDataUpdateCoordinator from .models import WLEDEntity -@dataclass -class WLEDSensorEntityDescriptionMixin: - """Mixin for required keys.""" - - value_fn: Callable[[WLEDDevice], datetime | StateType] - - -@dataclass -class WLEDSensorEntityDescription( - SensorEntityDescription, WLEDSensorEntityDescriptionMixin -): +@dataclass(kw_only=True) +class WLEDSensorEntityDescription(SensorEntityDescription): """Describes WLED sensor entity.""" exists_fn: Callable[[WLEDDevice], bool] = lambda _: True + value_fn: Callable[[WLEDDevice], datetime | StateType] SENSORS: tuple[WLEDSensorEntityDescription, ...] = (