forked from gvigroux/hon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.py
executable file
·106 lines (84 loc) · 2.01 KB
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
"""hOn component constants."""
from enum import IntEnum
from homeassistant.components.climate.const import (
FAN_AUTO,
FAN_LOW,
FAN_MEDIUM,
FAN_HIGH,
SWING_OFF,
SWING_BOTH,
SWING_VERTICAL,
SWING_HORIZONTAL,
HVACMode,
)
DOMAIN = "hon"
# to store the cookie
STORAGE_KEY = DOMAIN
STORAGE_VERSION = 1
CONF_ID_TOKEN = "token"
CONF_COGNITO_TOKEN = "cognito_token"
CONF_REFRESH_TOKEN = "refresh_token"
CONF_FRAMEWORK = "framework"
PLATFORMS = [
"climate",
"sensor",
]
class ClimateFanMode(IntEnum):
HON_FAN_OFF = 0
HON_FAN_AUTO = 5
HON_FAN_LOW = 3
HON_FAN_MEDIUM = 2
HON_FAN_HIGH = 1
class ClimateHvacMode(IntEnum):
HON_HVAC_AUTO = 0
HON_HVAC_COOL = 1
HON_HVAC_DRY = 2
HON_HVAC_HEAT = 4
HON_HVAC_FAN_ONLY = 6
class ClimateSwingVertical(IntEnum):
AUTO = 8
VERY_LOW = 2
LOW = 2
MEDIUM = 4
HIGH = 5
VERY_HIGH = 6
class ClimateSwingHorizontal(IntEnum):
AUTO = 7
VERY_LOW = 0
LOW = 3
MEDIUM = 4
HIGH = 5
VERY_HIGH = 6
CLIMATE_FAN_MODE = {
FAN_LOW: ClimateFanMode.HON_FAN_LOW.value,
FAN_MEDIUM: ClimateFanMode.HON_FAN_MEDIUM.value,
FAN_HIGH: ClimateFanMode.HON_FAN_HIGH.value,
FAN_AUTO: ClimateFanMode.HON_FAN_AUTO.value,
}
CLIMATE_HVAC_MODE = {
HVACMode.AUTO: ClimateHvacMode.HON_HVAC_AUTO,
HVACMode.COOL: ClimateHvacMode.HON_HVAC_COOL,
HVACMode.HEAT: ClimateHvacMode.HON_HVAC_HEAT,
HVACMode.DRY: ClimateHvacMode.HON_HVAC_DRY,
HVACMode.FAN_ONLY: ClimateHvacMode.HON_HVAC_FAN_ONLY,
}
CLIMATE_SWING_MODE_HORIZONTAL = {
SWING_OFF: ClimateSwingHorizontal.MEDIUM,
SWING_BOTH: ClimateSwingHorizontal.AUTO,
SWING_HORIZONTAL: ClimateSwingHorizontal.AUTO,
SWING_VERTICAL: ClimateSwingHorizontal.MEDIUM,
}
OVEN_PROGRAMS = {
"3": "Botton",
"4": "Bottom + fan",
"6": "Convection + fan",
"5": "Convectional",
"10": "Taylor Bake",
"23": "Multi-level",
"54": "Soft+",
}
WASHING_MACHINE_MODE = {
"1": "Ready",
"2": "Running",
"7": "Finished"
}