diff --git a/homeassistant/components/baf/binary_sensor.py b/homeassistant/components/baf/binary_sensor.py index 50e8cd78629..a4f501df5c1 100644 --- a/homeassistant/components/baf/binary_sensor.py +++ b/homeassistant/components/baf/binary_sensor.py @@ -21,20 +21,14 @@ from .entity import BAFEntity from .models import BAFData -@dataclass(frozen=True) -class BAFBinarySensorDescriptionMixin: - """Required values for BAF binary sensors.""" - - value_fn: Callable[[Device], bool | None] - - -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class BAFBinarySensorDescription( BinarySensorEntityDescription, - BAFBinarySensorDescriptionMixin, ): """Class describing BAF binary sensor entities.""" + value_fn: Callable[[Device], bool | None] + OCCUPANCY_SENSORS = ( BAFBinarySensorDescription( diff --git a/homeassistant/components/baf/number.py b/homeassistant/components/baf/number.py index 9dd4180c7e1..438dbbb689d 100644 --- a/homeassistant/components/baf/number.py +++ b/homeassistant/components/baf/number.py @@ -22,18 +22,13 @@ from .entity import BAFEntity from .models import BAFData -@dataclass(frozen=True) -class BAFNumberDescriptionMixin: - """Required values for BAF sensors.""" +@dataclass(frozen=True, kw_only=True) +class BAFNumberDescription(NumberEntityDescription): + """Class describing BAF sensor entities.""" value_fn: Callable[[Device], int | None] -@dataclass(frozen=True) -class BAFNumberDescription(NumberEntityDescription, BAFNumberDescriptionMixin): - """Class describing BAF sensor entities.""" - - AUTO_COMFORT_NUMBER_DESCRIPTIONS = ( BAFNumberDescription( key="comfort_min_speed", diff --git a/homeassistant/components/baf/sensor.py b/homeassistant/components/baf/sensor.py index 5c8d8f2979b..33cee901594 100644 --- a/homeassistant/components/baf/sensor.py +++ b/homeassistant/components/baf/sensor.py @@ -28,20 +28,14 @@ from .entity import BAFEntity from .models import BAFData -@dataclass(frozen=True) -class BAFSensorDescriptionMixin: - """Required values for BAF sensors.""" - - value_fn: Callable[[Device], int | float | str | None] - - -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class BAFSensorDescription( SensorEntityDescription, - BAFSensorDescriptionMixin, ): """Class describing BAF sensor entities.""" + value_fn: Callable[[Device], int | float | str | None] + AUTO_COMFORT_SENSORS = ( BAFSensorDescription( diff --git a/homeassistant/components/baf/switch.py b/homeassistant/components/baf/switch.py index ccb8aee36e5..406fcacadde 100644 --- a/homeassistant/components/baf/switch.py +++ b/homeassistant/components/baf/switch.py @@ -18,20 +18,14 @@ from .entity import BAFEntity from .models import BAFData -@dataclass(frozen=True) -class BAFSwitchDescriptionMixin: - """Required values for BAF sensors.""" - - value_fn: Callable[[Device], bool | None] - - -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class BAFSwitchDescription( SwitchEntityDescription, - BAFSwitchDescriptionMixin, ): """Class describing BAF switch entities.""" + value_fn: Callable[[Device], bool | None] + BASE_SWITCHES = [ BAFSwitchDescription(