Home Assistant Unofficial Reference 2024.12.1
models.py
Go to the documentation of this file.
1 """Models for eq3btsmart integration."""
2 
3 from dataclasses import dataclass
4 
5 from eq3btsmart.thermostat import Thermostat
6 
7 from .const import (
8  DEFAULT_CURRENT_TEMP_SELECTOR,
9  DEFAULT_SCAN_INTERVAL,
10  DEFAULT_TARGET_TEMP_SELECTOR,
11  CurrentTemperatureSelector,
12  TargetTemperatureSelector,
13 )
14 
15 
16 @dataclass(slots=True)
17 class Eq3Config:
18  """Config for a single eQ-3 device."""
19 
20  mac_address: str
21  current_temp_selector: CurrentTemperatureSelector = DEFAULT_CURRENT_TEMP_SELECTOR
22  target_temp_selector: TargetTemperatureSelector = DEFAULT_TARGET_TEMP_SELECTOR
23  external_temp_sensor: str = ""
24  scan_interval: int = DEFAULT_SCAN_INTERVAL
25 
26 
27 @dataclass(slots=True)
29  """Config entry for a single eQ-3 device."""
30 
31  eq3_config: Eq3Config
32  thermostat: Thermostat