mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Remove entity description mixin in BAF (#112386)
This commit is contained in:
parent
fc732ecf17
commit
f03be2fd9e
@ -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(
|
||||
|
@ -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",
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user