2023-05-07 00:52:54 +02:00
|
|
|
from homeassistant.components.climate import (
|
|
|
|
HVACMode,
|
|
|
|
FAN_LOW,
|
|
|
|
FAN_MEDIUM,
|
|
|
|
FAN_HIGH,
|
|
|
|
FAN_AUTO,
|
|
|
|
)
|
2023-04-26 23:57:44 +02:00
|
|
|
|
2023-03-06 13:41:58 +01:00
|
|
|
DOMAIN = "hon"
|
2023-06-08 20:01:55 +02:00
|
|
|
UPDATE_INTERVAL = 10
|
2023-02-19 02:58:21 +01:00
|
|
|
|
|
|
|
PLATFORMS = [
|
|
|
|
"sensor",
|
|
|
|
"select",
|
2023-03-03 18:23:30 +01:00
|
|
|
"number",
|
2023-03-05 00:54:57 +01:00
|
|
|
"switch",
|
2023-03-05 19:19:52 +01:00
|
|
|
"button",
|
|
|
|
"binary_sensor",
|
2023-04-26 23:57:44 +02:00
|
|
|
"climate",
|
2023-06-09 05:56:52 +02:00
|
|
|
"fan",
|
2023-02-19 02:58:21 +01:00
|
|
|
]
|
2023-04-26 23:57:44 +02:00
|
|
|
|
|
|
|
HON_HVAC_MODE = {
|
|
|
|
"0": HVACMode.AUTO,
|
|
|
|
"1": HVACMode.COOL,
|
2023-05-17 00:01:33 +02:00
|
|
|
"2": HVACMode.DRY,
|
2023-04-26 23:57:44 +02:00
|
|
|
"3": HVACMode.DRY,
|
|
|
|
"4": HVACMode.HEAT,
|
|
|
|
"5": HVACMode.FAN_ONLY,
|
|
|
|
"6": HVACMode.FAN_ONLY,
|
|
|
|
}
|
|
|
|
|
|
|
|
HON_HVAC_PROGRAM = {
|
|
|
|
HVACMode.AUTO: "iot_auto",
|
|
|
|
HVACMode.COOL: "iot_cool",
|
|
|
|
HVACMode.DRY: "iot_dry",
|
|
|
|
HVACMode.HEAT: "iot_heat",
|
|
|
|
HVACMode.FAN_ONLY: "iot_fan",
|
|
|
|
}
|
|
|
|
|
|
|
|
HON_FAN = {
|
2023-05-07 00:52:54 +02:00
|
|
|
"1": FAN_HIGH,
|
|
|
|
"2": FAN_MEDIUM,
|
|
|
|
"3": FAN_LOW,
|
|
|
|
"4": FAN_AUTO,
|
|
|
|
"5": FAN_AUTO,
|
2023-04-26 23:57:44 +02:00
|
|
|
}
|
2023-05-07 13:47:19 +02:00
|
|
|
|
|
|
|
# These languages are official supported by hOn
|
|
|
|
LANGUAGES = [
|
|
|
|
"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
|
|
|
|
]
|
|
|
|
|
|
|
|
WASHING_PR_PHASE = {
|
2023-06-11 22:34:32 +02: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 13:47:19 +02:00
|
|
|
}
|
2023-06-11 22:34:32 +02:00
|
|
|
|
2023-05-07 13:47:19 +02:00
|
|
|
MACH_MODE = {
|
2023-06-11 22:34:32 +02: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 13:47:19 +02:00
|
|
|
}
|
2023-06-11 22:34:32 +02:00
|
|
|
|
2023-05-07 13:47:19 +02:00
|
|
|
TUMBLE_DRYER_PR_PHASE = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"0": "ready",
|
|
|
|
"1": "heat_stroke",
|
|
|
|
"2": "drying",
|
|
|
|
"3": "cooldown",
|
2023-06-10 07:00:57 +02:00
|
|
|
"8": "unknown",
|
2023-06-11 22:34:32 +02:00
|
|
|
"11": "ready",
|
2023-05-30 05:33:11 +02:00
|
|
|
"12": "unknown",
|
2023-06-11 22:34:32 +02:00
|
|
|
"13": "cooldown",
|
|
|
|
"14": "heat_stroke",
|
|
|
|
"15": "heat_stroke",
|
|
|
|
"16": "cooldown",
|
2023-05-07 13:47:19 +02:00
|
|
|
"17": "unknown",
|
2023-06-11 22:34:32 +02:00
|
|
|
"18": "tumbling",
|
|
|
|
"19": "drying",
|
|
|
|
"20": "drying",
|
2023-05-07 13:47:19 +02:00
|
|
|
}
|
2023-06-11 22:34:32 +02:00
|
|
|
|
2023-05-08 02:05:04 +02:00
|
|
|
DIRTY_LEVEL = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"1": "little",
|
|
|
|
"2": "normal",
|
|
|
|
"3": "very",
|
2023-05-08 02:05:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
STEAM_LEVEL = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"0": "no_steam",
|
|
|
|
"1": "cotton",
|
|
|
|
"2": "delicate",
|
|
|
|
"3": "synthetic",
|
2023-05-08 02:05:04 +02:00
|
|
|
}
|
|
|
|
|
2023-05-07 13:47:19 +02:00
|
|
|
DISHWASHER_PR_PHASE = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"0": "ready",
|
|
|
|
"1": "prewash",
|
|
|
|
"2": "washing",
|
|
|
|
"3": "rinse",
|
|
|
|
"4": "drying",
|
|
|
|
"5": "ready",
|
|
|
|
"6": "hot_rinse",
|
2023-05-07 13:47:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
TUMBLE_DRYER_DRY_LEVEL = {
|
2023-06-11 22:34:32 +02: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 13:47:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
AC_MACH_MODE = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"0": "auto",
|
|
|
|
"1": "cool",
|
|
|
|
"2": "cool",
|
|
|
|
"3": "dry",
|
|
|
|
"4": "heat",
|
|
|
|
"5": "fan",
|
|
|
|
"6": "fan",
|
2023-05-07 13:47:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
AC_FAN_MODE = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"1": "high",
|
|
|
|
"2": "mid",
|
|
|
|
"3": "low",
|
|
|
|
"4": "auto",
|
|
|
|
"5": "auto",
|
2023-05-07 13:47:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
AC_HUMAN_SENSE = {
|
2023-06-11 22:34:32 +02:00
|
|
|
"0": "touch_off",
|
|
|
|
"1": "avoid_touch",
|
|
|
|
"2": "follow_touch",
|
2023-05-21 20:51:20 +02:00
|
|
|
}
|