Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the ecobee integration."""
2 
3 import logging
4 
6  ATTR_CONDITION_CLOUDY,
7  ATTR_CONDITION_FOG,
8  ATTR_CONDITION_HAIL,
9  ATTR_CONDITION_LIGHTNING_RAINY,
10  ATTR_CONDITION_PARTLYCLOUDY,
11  ATTR_CONDITION_POURING,
12  ATTR_CONDITION_RAINY,
13  ATTR_CONDITION_SNOWY,
14  ATTR_CONDITION_SNOWY_RAINY,
15  ATTR_CONDITION_SUNNY,
16  ATTR_CONDITION_WINDY,
17 )
18 from homeassistant.const import Platform
19 
20 _LOGGER = logging.getLogger(__package__)
21 
22 DOMAIN = "ecobee"
23 DATA_ECOBEE_CONFIG = "ecobee_config"
24 DATA_HASS_CONFIG = "ecobee_hass_config"
25 ATTR_CONFIG_ENTRY_ID = "entry_id"
26 ATTR_AVAILABLE_SENSORS = "available_sensors"
27 ATTR_ACTIVE_SENSORS = "active_sensors"
28 
29 CONF_REFRESH_TOKEN = "refresh_token"
30 
31 ECOBEE_MODEL_TO_NAME = {
32  "idtSmart": "ecobee Smart",
33  "idtEms": "ecobee Smart EMS",
34  "siSmart": "ecobee Si Smart",
35  "siEms": "ecobee Si EMS",
36  "athenaSmart": "ecobee3 Smart",
37  "athenaEms": "ecobee3 EMS",
38  "corSmart": "Carrier/Bryant Cor",
39  "nikeSmart": "ecobee3 lite Smart",
40  "nikeEms": "ecobee3 lite EMS",
41  "apolloSmart": "ecobee4 Smart",
42  "vulcanSmart": "ecobee4 Smart",
43  "aresSmart": "ecobee Smart Premium",
44  "artemisSmart": "ecobee Smart Enhanced",
45 }
46 
47 PLATFORMS = [
48  Platform.BINARY_SENSOR,
49  Platform.CLIMATE,
50  Platform.HUMIDIFIER,
51  Platform.NOTIFY,
52  Platform.NUMBER,
53  Platform.SENSOR,
54  Platform.SWITCH,
55  Platform.WEATHER,
56 ]
57 
58 MANUFACTURER = "ecobee"
59 
60 ECOBEE_AUX_HEAT_ONLY = "auxHeatOnly"
61 
62 # Translates ecobee API weatherSymbol to Home Assistant usable names
63 # https://www.ecobee.com/home/developer/api/documentation/v1/objects/WeatherForecast.shtml
64 ECOBEE_WEATHER_SYMBOL_TO_HASS = {
65  0: ATTR_CONDITION_SUNNY,
66  1: ATTR_CONDITION_PARTLYCLOUDY,
67  2: ATTR_CONDITION_PARTLYCLOUDY,
68  3: ATTR_CONDITION_CLOUDY,
69  4: ATTR_CONDITION_CLOUDY,
70  5: ATTR_CONDITION_CLOUDY,
71  6: ATTR_CONDITION_RAINY,
72  7: ATTR_CONDITION_SNOWY_RAINY,
73  8: ATTR_CONDITION_POURING,
74  9: ATTR_CONDITION_HAIL,
75  10: ATTR_CONDITION_SNOWY,
76  11: ATTR_CONDITION_SNOWY,
77  12: ATTR_CONDITION_SNOWY_RAINY,
78  13: "snowy-heavy",
79  14: ATTR_CONDITION_HAIL,
80  15: ATTR_CONDITION_LIGHTNING_RAINY,
81  16: ATTR_CONDITION_WINDY,
82  17: "tornado",
83  18: ATTR_CONDITION_FOG,
84  19: "hazy",
85  20: "hazy",
86  21: "hazy",
87  -2: None,
88 }