|
| 1 | +"""Vantage Generic HVAC RS485 objects.""" |
| 2 | + |
| 3 | +from dataclasses import dataclass, field |
| 4 | + |
| 5 | +from aiovantage.object_interfaces import FanInterface, ThermostatInterface |
| 6 | + |
| 7 | +from .child_device import ChildDevice |
| 8 | +from .port_device import PortDevice |
| 9 | + |
| 10 | + |
| 11 | +@dataclass(kw_only=True) |
| 12 | +class VantageGenericHVACRS485Port(PortDevice): |
| 13 | + """Vantage Generic HVAC RS485 port device.""" |
| 14 | + |
| 15 | + class Meta: |
| 16 | + name = "Vantage.Generic_HVAC_RS485_PORT" |
| 17 | + |
| 18 | + @dataclass(kw_only=True) |
| 19 | + class FanSpeedSettings: |
| 20 | + auto_fan: bool = True |
| 21 | + high_fan: bool = True |
| 22 | + low_fan: bool = True |
| 23 | + max_fan: bool = True |
| 24 | + med_fan: bool = True |
| 25 | + off_fan: bool = True |
| 26 | + |
| 27 | + @dataclass(kw_only=True) |
| 28 | + class SensorSettings: |
| 29 | + no_device_sensors: bool = False |
| 30 | + outdoor_sensor: int = field(metadata={"name": "outdoorSensor"}) |
| 31 | + outdoor_temp_offset: str = field( |
| 32 | + default="0", metadata={"name": "outdoorTempOffset"} |
| 33 | + ) |
| 34 | + track_sensors: bool = False |
| 35 | + |
| 36 | + @dataclass(kw_only=True) |
| 37 | + class SetpointSettings: |
| 38 | + bind_setpoints: bool = False |
| 39 | + max_temp: int = 25 |
| 40 | + min_temp: int = 15 |
| 41 | + |
| 42 | + fan_boost_option: bool = False |
| 43 | + fan_speed_settings: FanSpeedSettings |
| 44 | + fan_individual_control: bool = False |
| 45 | + receive_port: int |
| 46 | + sensor_settings: SensorSettings |
| 47 | + setpoint_settings: SetpointSettings |
| 48 | + |
| 49 | + |
| 50 | +@dataclass(kw_only=True) |
| 51 | +class VantageGenericHVACRS485TechContactsChild(ChildDevice): |
| 52 | + """Vantage Generic HVAC RS485 tech contacts child device.""" |
| 53 | + |
| 54 | + class Meta: |
| 55 | + name = "Vantage.Generic_HVAC_RS485_TechContacts_CHILD" |
| 56 | + |
| 57 | + |
| 58 | +@dataclass(kw_only=True) |
| 59 | +class VantageGenericHVACRS485CompoundChild(ChildDevice, ThermostatInterface): |
| 60 | + """Vantage Generic HVAC RS485 compound child device.""" |
| 61 | + |
| 62 | + class Meta: |
| 63 | + name = "Vantage.Generic_HVAC_RS485_Compound_CHILD" |
| 64 | + |
| 65 | + adress_number: int = 1 # NOTE: Intentional typo to match the underlying object |
| 66 | + |
| 67 | + |
| 68 | +@dataclass(kw_only=True) |
| 69 | +class VantageGenericHVACRS485ZoneChild(ChildDevice, ThermostatInterface, FanInterface): |
| 70 | + """Vantage Generic HVAC RS485 zone child device.""" |
| 71 | + |
| 72 | + class Meta: |
| 73 | + name = "Vantage.Generic_HVAC_RS485_Zone_CHILD" |
| 74 | + |
| 75 | + @dataclass(kw_only=True) |
| 76 | + class IndoorSettings: |
| 77 | + indoor_sensor: int = field(metadata={"name": "indoorSensor"}) |
| 78 | + indoor_temp_offset: str = "0" |
| 79 | + |
| 80 | + indoor_settings: IndoorSettings |
| 81 | + position_number: int = 1 |
| 82 | + |
| 83 | + |
| 84 | +@dataclass(kw_only=True) |
| 85 | +class VantageGenericHVACRS485ZoneWithoutFanSpeedChild( |
| 86 | + ChildDevice, ThermostatInterface, FanInterface |
| 87 | +): |
| 88 | + """Vantage Generic HVAC RS485 zone child device without fan speed.""" |
| 89 | + |
| 90 | + class Meta: |
| 91 | + name = "Vantage.Generic_HVAC_RS485_Zone_without_FanSpeed_CHILD" |
| 92 | + |
| 93 | + @dataclass(kw_only=True) |
| 94 | + class IndoorSettings: |
| 95 | + indoor_sensor: int = field(metadata={"name": "indoorSensor"}) |
| 96 | + indoor_temp_offset: str = "0" |
| 97 | + |
| 98 | + indoor_settings: IndoorSettings |
| 99 | + position_number: int = 1 |
0 commit comments