Remove entity description mixin in Xiaomi Miio (#112973)
This commit is contained in:
parent
ea300623f9
commit
85b6d70b04
2 changed files with 4 additions and 16 deletions
|
@ -109,17 +109,12 @@ ATTR_OSCILLATION_ANGLE = "angle"
|
||||||
ATTR_VOLUME = "volume"
|
ATTR_VOLUME = "volume"
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class XiaomiMiioNumberMixin:
|
class XiaomiMiioNumberDescription(NumberEntityDescription):
|
||||||
"""A class that describes number entities."""
|
"""A class that describes number entities."""
|
||||||
|
|
||||||
method: str
|
method: str
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class XiaomiMiioNumberDescription(NumberEntityDescription, XiaomiMiioNumberMixin):
|
|
||||||
"""A class that describes number entities."""
|
|
||||||
|
|
||||||
available_with_device_off: bool = True
|
available_with_device_off: bool = True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -220,21 +220,14 @@ MODEL_TO_FEATURES_MAP = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class XiaomiMiioSwitchRequiredKeyMixin:
|
class XiaomiMiioSwitchDescription(SwitchEntityDescription):
|
||||||
"""A class that describes switch entities."""
|
"""A class that describes switch entities."""
|
||||||
|
|
||||||
feature: int
|
feature: int
|
||||||
method_on: str
|
method_on: str
|
||||||
method_off: str
|
method_off: str
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class XiaomiMiioSwitchDescription(
|
|
||||||
SwitchEntityDescription, XiaomiMiioSwitchRequiredKeyMixin
|
|
||||||
):
|
|
||||||
"""A class that describes switch entities."""
|
|
||||||
|
|
||||||
available_with_device_off: bool = True
|
available_with_device_off: bool = True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue