2023-05-06 22:52:54 +00:00
|
|
|
from homeassistant.components.climate import (
|
|
|
|
HVACMode,
|
|
|
|
FAN_LOW,
|
|
|
|
FAN_MEDIUM,
|
|
|
|
FAN_HIGH,
|
|
|
|
FAN_AUTO,
|
|
|
|
)
|
2023-04-26 21:57:44 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
DOMAIN: str = "hon"
|
2024-01-29 18:44:05 +00:00
|
|
|
UPDATE_INTERVAL: int = 60
|
2024-02-10 00:02:26 +00:00
|
|
|
MOBILE_ID: str = "homassistant"
|
|
|
|
CONF_REFRESH_TOKEN = "refresh_token"
|
2023-02-19 01:58:21 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
PLATFORMS: list[str] = [
|
2023-02-19 01:58:21 +00:00
|
|
|
"sensor",
|
|
|
|
"select",
|
2023-03-03 17:23:30 +00:00
|
|
|
"number",
|
2023-03-04 23:54:57 +00:00
|
|
|
"switch",
|
2023-03-05 18:19:52 +00:00
|
|
|
"button",
|
|
|
|
"binary_sensor",
|
2023-04-26 21:57:44 +00:00
|
|
|
"climate",
|
2023-06-09 03:56:52 +00:00
|
|
|
"fan",
|
2023-06-30 17:36:36 +00:00
|
|
|
"light",
|
2023-07-01 12:24:04 +00:00
|
|
|
"lock",
|
2023-02-19 01:58:21 +00:00
|
|
|
]
|
2023-04-26 21:57:44 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
APPLIANCES: dict[str, str] = {
|
2023-06-30 23:45:32 +00:00
|
|
|
"AC": "Air Conditioner",
|
|
|
|
"AP": "Air Purifier",
|
|
|
|
"AS": "Air Scanner",
|
|
|
|
"DW": "Dish Washer",
|
|
|
|
"HO": "Hood",
|
|
|
|
"IH": "Induction Hob",
|
|
|
|
"MW": "Microwave",
|
|
|
|
"OV": "Oven",
|
|
|
|
"REF": "Fridge",
|
|
|
|
"RVC": "Robot Vacuum Cleaner",
|
|
|
|
"TD": "Tumble Dryer",
|
|
|
|
"WC": "Wine Cellar",
|
|
|
|
"WD": "Washer Dryer",
|
|
|
|
"WH": "Water Heater",
|
|
|
|
"WM": "Washing Machine",
|
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
HON_HVAC_MODE: dict[int, HVACMode] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: HVACMode.AUTO,
|
|
|
|
1: HVACMode.COOL,
|
|
|
|
2: HVACMode.DRY,
|
|
|
|
3: HVACMode.DRY,
|
|
|
|
4: HVACMode.HEAT,
|
|
|
|
5: HVACMode.FAN_ONLY,
|
|
|
|
6: HVACMode.FAN_ONLY,
|
2023-04-26 21:57:44 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
HON_HVAC_PROGRAM: dict[str, str] = {
|
2023-04-26 21:57:44 +00:00
|
|
|
HVACMode.AUTO: "iot_auto",
|
|
|
|
HVACMode.COOL: "iot_cool",
|
|
|
|
HVACMode.DRY: "iot_dry",
|
|
|
|
HVACMode.HEAT: "iot_heat",
|
|
|
|
HVACMode.FAN_ONLY: "iot_fan",
|
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
HON_FAN: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
1: FAN_HIGH,
|
|
|
|
2: FAN_MEDIUM,
|
|
|
|
3: FAN_LOW,
|
|
|
|
4: FAN_AUTO,
|
|
|
|
5: FAN_AUTO,
|
2023-04-26 21:57:44 +00:00
|
|
|
}
|
2023-05-07 11:47:19 +00:00
|
|
|
|
|
|
|
# These languages are official supported by hOn
|
2023-07-23 19:52:42 +00:00
|
|
|
LANGUAGES: list[str] = [
|
2023-05-07 11:47:19 +00:00
|
|
|
"cs", # Czech
|
|
|
|
"de", # German
|
|
|
|
"el", # Greek
|
|
|
|
"en", # English
|
|
|
|
"es", # Spanish
|
|
|
|
"fr", # French
|
|
|
|
"he", # Hebrew
|
|
|
|
"hr", # Croatian
|
|
|
|
"it", # Italian
|
|
|
|
"nl", # Dutch
|
|
|
|
"pl", # Polish
|
|
|
|
"pt", # Portuguese
|
|
|
|
"ro", # Romanian
|
|
|
|
"ru", # Russian
|
|
|
|
"sk", # Slovak
|
|
|
|
"sl", # Slovenian
|
|
|
|
"sr", # Serbian
|
|
|
|
"tr", # Turkish
|
|
|
|
"zh", # Chinese
|
|
|
|
]
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
WASHING_PR_PHASE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "ready",
|
|
|
|
1: "washing",
|
|
|
|
2: "washing",
|
|
|
|
3: "spin",
|
|
|
|
4: "rinse",
|
|
|
|
5: "rinse",
|
|
|
|
6: "rinse",
|
|
|
|
7: "drying",
|
|
|
|
9: "steam",
|
|
|
|
10: "ready",
|
|
|
|
11: "spin",
|
|
|
|
12: "weighting",
|
|
|
|
13: "weighting",
|
|
|
|
14: "washing",
|
|
|
|
15: "washing",
|
|
|
|
16: "washing",
|
|
|
|
17: "rinse",
|
|
|
|
18: "rinse",
|
|
|
|
19: "scheduled",
|
|
|
|
20: "tumbling",
|
|
|
|
24: "refresh",
|
|
|
|
25: "washing",
|
|
|
|
26: "heating",
|
|
|
|
27: "washing",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
2023-06-11 20:34:32 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
MACH_MODE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "ready", # NO_STATE
|
|
|
|
1: "ready", # SELECTION_MODE
|
|
|
|
2: "running", # EXECUTION_MODE
|
|
|
|
3: "pause", # PAUSE_MODE
|
|
|
|
4: "scheduled", # DELAY_START_SELECTION_MODE
|
|
|
|
5: "scheduled", # DELAY_START_EXECUTION_MODE
|
|
|
|
6: "error", # ERROR_MODE
|
|
|
|
7: "ready", # END_MODE
|
|
|
|
8: "test", # TEST_MODE
|
|
|
|
9: "ending", # STOP_MODE
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
2023-06-11 20:34:32 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
TUMBLE_DRYER_PR_PHASE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "ready",
|
|
|
|
1: "heat_stroke",
|
|
|
|
2: "drying",
|
|
|
|
3: "cooldown",
|
|
|
|
8: "unknown",
|
|
|
|
11: "ready",
|
|
|
|
12: "unknown",
|
|
|
|
13: "cooldown",
|
|
|
|
14: "heat_stroke",
|
|
|
|
15: "heat_stroke",
|
|
|
|
16: "cooldown",
|
|
|
|
17: "unknown",
|
|
|
|
18: "tumbling",
|
|
|
|
19: "drying",
|
|
|
|
20: "drying",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
2023-06-11 20:34:32 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
DIRTY_LEVEL: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "unknown",
|
|
|
|
1: "little",
|
|
|
|
2: "normal",
|
|
|
|
3: "very",
|
2023-05-08 00:05:04 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
STEAM_LEVEL: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "no_steam",
|
|
|
|
1: "cotton",
|
|
|
|
2: "delicate",
|
|
|
|
3: "synthetic",
|
2023-05-08 00:05:04 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
DISHWASHER_PR_PHASE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "ready",
|
|
|
|
1: "prewash",
|
|
|
|
2: "washing",
|
|
|
|
3: "rinse",
|
|
|
|
4: "drying",
|
|
|
|
5: "ready",
|
|
|
|
6: "hot_rinse",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
TUMBLE_DRYER_DRY_LEVEL: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "no_dry",
|
|
|
|
1: "iron_dry",
|
|
|
|
2: "no_dry_iron",
|
|
|
|
3: "cupboard_dry",
|
|
|
|
4: "extra_dry",
|
|
|
|
11: "no_dry",
|
|
|
|
12: "iron_dry",
|
|
|
|
13: "cupboard_dry",
|
|
|
|
14: "ready_to_wear",
|
|
|
|
15: "extra_dry",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
AC_MACH_MODE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "auto",
|
|
|
|
1: "cool",
|
|
|
|
2: "cool",
|
|
|
|
3: "dry",
|
|
|
|
4: "heat",
|
|
|
|
5: "fan",
|
|
|
|
6: "fan",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
AC_FAN_MODE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
1: "high",
|
|
|
|
2: "mid",
|
|
|
|
3: "low",
|
|
|
|
4: "auto",
|
|
|
|
5: "auto",
|
2023-05-07 11:47:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
AC_HUMAN_SENSE: dict[int, str] = {
|
2023-06-12 22:14:51 +00:00
|
|
|
0: "touch_off",
|
|
|
|
1: "avoid_touch",
|
|
|
|
2: "follow_touch",
|
|
|
|
3: "unknown",
|
2023-05-21 18:51:20 +00:00
|
|
|
}
|
2023-06-20 22:59:00 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
AP_MACH_MODE: dict[int, str] = {
|
2023-06-22 11:18:45 +00:00
|
|
|
0: "standby",
|
|
|
|
1: "sleep",
|
|
|
|
2: "auto",
|
|
|
|
3: "allergens",
|
|
|
|
4: "max",
|
2023-06-20 22:59:00 +00:00
|
|
|
}
|
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
AP_DIFFUSER_LEVEL: dict[int, str] = {
|
2023-07-09 22:21:45 +00:00
|
|
|
0: "off",
|
2023-06-22 11:18:45 +00:00
|
|
|
1: "soft",
|
|
|
|
2: "mid",
|
|
|
|
3: "h_biotics",
|
|
|
|
4: "custom",
|
2023-06-20 22:59:00 +00:00
|
|
|
}
|
2023-07-19 21:57:33 +00:00
|
|
|
|
2023-07-23 19:52:42 +00:00
|
|
|
REF_HUMIDITY_LEVELS: dict[int, str] = {1: "low", 2: "mid", 3: "high"}
|
2023-10-02 01:33:45 +00:00
|
|
|
|
|
|
|
STAIN_TYPES: dict[int, str] = {
|
|
|
|
0: "unknown",
|
|
|
|
1: "wine",
|
|
|
|
2: "grass",
|
|
|
|
3: "soil",
|
|
|
|
4: "blood",
|
|
|
|
5: "milk",
|
|
|
|
# 6: "butter",
|
|
|
|
6: "cooking_oil",
|
|
|
|
7: "tea",
|
|
|
|
8: "coffee",
|
|
|
|
# 9: "chocolate",
|
|
|
|
9: "ice_cream",
|
|
|
|
10: "lip_gloss",
|
|
|
|
11: "curry",
|
|
|
|
12: "milk_tea",
|
|
|
|
# 13: "chili_oil",
|
|
|
|
13: "rust",
|
|
|
|
14: "blue_ink",
|
|
|
|
# 14: "mech_grease",
|
|
|
|
# 15: "color_pencil",
|
|
|
|
# 15: "deodorant",
|
|
|
|
15: "perfume",
|
|
|
|
# 16: "glue",
|
|
|
|
16: "shoe_cream",
|
|
|
|
17: "oil_pastel",
|
|
|
|
18: "blueberry",
|
|
|
|
19: "sweat",
|
|
|
|
20: "egg",
|
|
|
|
# 20: "mayonnaise",
|
|
|
|
21: "ketchup",
|
|
|
|
22: "baby_food",
|
|
|
|
23: "soy_sauce",
|
|
|
|
24: "bean_paste",
|
|
|
|
25: "chili_sauce",
|
|
|
|
26: "fruit",
|
|
|
|
}
|
2023-10-02 23:49:24 +00:00
|
|
|
|
|
|
|
AC_POSITION_HORIZONTAL = {
|
|
|
|
0: "position_1",
|
|
|
|
3: "position_2",
|
|
|
|
4: "position_3",
|
|
|
|
5: "position_4",
|
|
|
|
6: "position_5",
|
|
|
|
7: "swing",
|
|
|
|
}
|
|
|
|
|
|
|
|
AC_POSITION_VERTICAL = {
|
|
|
|
2: "position_1",
|
|
|
|
4: "position_2",
|
|
|
|
5: "position_3",
|
|
|
|
6: "position_4",
|
|
|
|
7: "position_5",
|
|
|
|
8: "swing",
|
|
|
|
}
|