2021-08-25 14:36:25 +00:00
|
|
|
"""Define RainMachine data models."""
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
2022-08-03 22:23:42 +00:00
|
|
|
from homeassistant.helpers.entity import EntityDescription
|
|
|
|
|
2021-08-25 14:36:25 +00:00
|
|
|
|
|
|
|
@dataclass
|
2022-08-03 22:23:42 +00:00
|
|
|
class RainMachineEntityDescriptionMixinApiCategory:
|
|
|
|
"""Define an entity description mixin to include an API category."""
|
2021-08-25 14:36:25 +00:00
|
|
|
|
|
|
|
api_category: str
|
2022-08-03 22:23:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class RainMachineEntityDescriptionMixinDataKey:
|
|
|
|
"""Define an entity description mixin to include a data payload key."""
|
|
|
|
|
2022-05-31 19:09:07 +00:00
|
|
|
data_key: str
|
2022-04-13 20:41:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
2022-08-03 22:23:42 +00:00
|
|
|
class RainMachineEntityDescriptionMixinUid:
|
|
|
|
"""Define an entity description mixin to include an activity UID."""
|
2022-04-13 20:41:48 +00:00
|
|
|
|
|
|
|
uid: int
|
2022-08-03 22:23:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class RainMachineEntityDescription(
|
|
|
|
EntityDescription, RainMachineEntityDescriptionMixinApiCategory
|
|
|
|
):
|
|
|
|
"""Describe a RainMachine entity."""
|