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"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class XiaomiMiioNumberMixin:
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class XiaomiMiioNumberDescription(NumberEntityDescription):
|
||||
"""A class that describes number entities."""
|
||||
|
||||
method: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class XiaomiMiioNumberDescription(NumberEntityDescription, XiaomiMiioNumberMixin):
|
||||
"""A class that describes number entities."""
|
||||
|
||||
available_with_device_off: bool = True
|
||||
|
||||
|
||||
|
|
|
@ -220,21 +220,14 @@ MODEL_TO_FEATURES_MAP = {
|
|||
}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class XiaomiMiioSwitchRequiredKeyMixin:
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class XiaomiMiioSwitchDescription(SwitchEntityDescription):
|
||||
"""A class that describes switch entities."""
|
||||
|
||||
feature: int
|
||||
method_on: str
|
||||
method_off: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class XiaomiMiioSwitchDescription(
|
||||
SwitchEntityDescription, XiaomiMiioSwitchRequiredKeyMixin
|
||||
):
|
||||
"""A class that describes switch entities."""
|
||||
|
||||
available_with_device_off: bool = True
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue