Remove unnecessary RainMachine entity description mixins (#108190)
This commit is contained in:
parent
9bbf098901
commit
d5c1049bfe
6 changed files with 40 additions and 90 deletions
|
@ -31,11 +31,7 @@ from .const import (
|
|||
DEFAULT_ZONE_RUN,
|
||||
DOMAIN,
|
||||
)
|
||||
from .model import (
|
||||
RainMachineEntityDescription,
|
||||
RainMachineEntityDescriptionMixinDataKey,
|
||||
RainMachineEntityDescriptionMixinUid,
|
||||
)
|
||||
from .model import RainMachineEntityDescription
|
||||
from .util import RUN_STATE_MAP, key_exists
|
||||
|
||||
ATTR_AREA = "area"
|
||||
|
@ -134,27 +130,26 @@ def raise_on_request_error(
|
|||
return decorator
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RainMachineSwitchDescription(
|
||||
SwitchEntityDescription,
|
||||
RainMachineEntityDescription,
|
||||
SwitchEntityDescription, RainMachineEntityDescription
|
||||
):
|
||||
"""Describe a RainMachine switch."""
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RainMachineActivitySwitchDescription(
|
||||
RainMachineSwitchDescription, RainMachineEntityDescriptionMixinUid
|
||||
):
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RainMachineActivitySwitchDescription(RainMachineSwitchDescription):
|
||||
"""Describe a RainMachine activity (program/zone) switch."""
|
||||
|
||||
uid: int
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RainMachineRestrictionSwitchDescription(
|
||||
RainMachineSwitchDescription, RainMachineEntityDescriptionMixinDataKey
|
||||
):
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class RainMachineRestrictionSwitchDescription(RainMachineSwitchDescription):
|
||||
"""Describe a RainMachine restriction switch."""
|
||||
|
||||
data_key: str
|
||||
|
||||
|
||||
TYPE_RESTRICTIONS_FREEZE_PROTECT_ENABLED = "freeze_protect_enabled"
|
||||
TYPE_RESTRICTIONS_HOT_DAYS_EXTRA_WATERING = "hot_days_extra_watering"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue