Source code for aioafero.v1.models.valve
"""Representation of an Afero Valve and its corresponding updates."""
from dataclasses import dataclass, field
from aioafero.v1.models import features
from .resource import ResourceTypes
from .standard_mixin import StandardMixin
[docs]
@dataclass(kw_only=True)
class Valve(StandardMixin):
"""Representation of an Afero Valve."""
type: ResourceTypes = ResourceTypes.WATER_TIMER
open: dict[str | None, features.OpenFeature] = field(default_factory=dict)
[docs]
@dataclass
class ValvePut:
"""States that can be updated for a Valve."""
open: features.OpenFeature | None = None