Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """const."""
2 
3 from __future__ import annotations
4 
5 from logging import Logger, getLogger
6 
7 _LOGGER: Logger = getLogger(__package__)
8 
9 COORDINATORS = "coordinators"
10 
11 DATA_DISCOVERY_SERVICE = "refoss_discovery"
12 
13 DISCOVERY_SCAN_INTERVAL = 30
14 DISCOVERY_TIMEOUT = 8
15 DISPATCH_DEVICE_DISCOVERED = "refoss_device_discovered"
16 DISPATCHERS = "dispatchers"
17 
18 DOMAIN = "refoss"
19 COORDINATOR = "coordinator"
20 
21 MAX_ERRORS = 2
22 
23 # Energy monitoring
24 SENSOR_EM = "em"
25 
26 CHANNEL_DISPLAY_NAME: dict[str, dict[int, str]] = {
27  "em06": {
28  1: "A1",
29  2: "B1",
30  3: "C1",
31  4: "A2",
32  5: "B2",
33  6: "C2",
34  },
35  "em16": {
36  1: "A1",
37  2: "A2",
38  3: "A3",
39  4: "A4",
40  5: "A5",
41  6: "A6",
42  7: "B1",
43  8: "B2",
44  9: "B3",
45  10: "B4",
46  11: "B5",
47  12: "B6",
48  13: "C1",
49  14: "C2",
50  15: "C3",
51  16: "C4",
52  17: "C5",
53  18: "C6",
54  },
55 }