Source code for aioafero.v1.models.security_system_sensor

"""Representation of an Afero Security System Sensor (derived) and its corresponding updates."""

from dataclasses import dataclass, field

from . import features
from .resource import ResourceTypes
from .standard_mixin import StandardMixin


[docs] @dataclass(kw_only=True) class SecuritySystemSensor(StandardMixin): """Representation of a security system sensor.""" type: ResourceTypes = ResourceTypes.SECURITY_SYSTEM_SENSOR config_key: str | None = None # Override the instance property to return an int @property def instance(self): """Instance for the split device.""" return int(self.split.instance)
[docs] @dataclass class SecuritySystemSensorPut: """States that can be updated for a Security System Sensor.""" sensor_config: features.SecuritySensorConfigFeature | None = field( default=None, repr=False, init=False )