Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """The constants of the Evohome integration."""
2 
3 from __future__ import annotations
4 
5 from datetime import timedelta
6 from enum import StrEnum, unique
7 from typing import Final
8 
9 DOMAIN: Final = "evohome"
10 
11 STORAGE_VER: Final = 1
12 STORAGE_KEY: Final = DOMAIN
13 
14 # The Parent's (i.e. TCS, Controller) operating mode is one of:
15 EVO_RESET: Final = "AutoWithReset"
16 EVO_AUTO: Final = "Auto"
17 EVO_AUTOECO: Final = "AutoWithEco"
18 EVO_AWAY: Final = "Away"
19 EVO_DAYOFF: Final = "DayOff"
20 EVO_CUSTOM: Final = "Custom"
21 EVO_HEATOFF: Final = "HeatingOff"
22 
23 # The Children's (i.e. Dhw, Zone) operating mode is one of:
24 EVO_FOLLOW: Final = "FollowSchedule" # the operating mode is 'inherited' from the TCS
25 EVO_TEMPOVER: Final = "TemporaryOverride"
26 EVO_PERMOVER: Final = "PermanentOverride"
27 
28 # These two are used only to help prevent E501 (line too long) violations
29 GWS: Final = "gateways"
30 TCS: Final = "temperatureControlSystems"
31 
32 UTC_OFFSET: Final = "currentOffsetMinutes"
33 
34 CONF_LOCATION_IDX: Final = "location_idx"
35 
36 ACCESS_TOKEN: Final = "access_token"
37 ACCESS_TOKEN_EXPIRES: Final = "access_token_expires"
38 REFRESH_TOKEN: Final = "refresh_token"
39 USER_DATA: Final = "user_data"
40 
41 SCAN_INTERVAL_DEFAULT: Final = timedelta(seconds=300)
42 SCAN_INTERVAL_MINIMUM: Final = timedelta(seconds=60)
43 
44 ATTR_SYSTEM_MODE: Final = "mode"
45 ATTR_DURATION_DAYS: Final = "period"
46 ATTR_DURATION_HOURS: Final = "duration"
47 
48 ATTR_ZONE_TEMP: Final = "setpoint"
49 ATTR_DURATION_UNTIL: Final = "duration"
50 
51 
52 @unique
53 class EvoService(StrEnum):
54  """The Evohome services."""
55 
56  REFRESH_SYSTEM = "refresh_system"
57  SET_SYSTEM_MODE = "set_system_mode"
58  RESET_SYSTEM = "reset_system"
59  SET_ZONE_OVERRIDE = "set_zone_override"
60  RESET_ZONE_OVERRIDE = "clear_zone_override"