Remove entity description mixin in Xiaomi Miio (#112973)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:52:19 +01:00 committed by GitHub
parent ea300623f9
commit 85b6d70b04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 16 deletions

View file

@ -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

View file

@ -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