mirror of https://github.com/Andre0512/hon.git
Compare commits
3 Commits
1a78251a93
...
20d467a2d5
Author | SHA1 | Date |
---|---|---|
Andre Basche | 20d467a2d5 | |
Andre Basche | 38a67ad64c | |
Andre Basche | 6e8576c7bd |
|
@ -14,8 +14,6 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- home-assistant: "2024.1.0"
|
||||
python-version: "3.11"
|
||||
- home-assistant: "2024.2.0"
|
||||
python-version: "3.11"
|
||||
- home-assistant: "2024.2.0"
|
||||
|
|
|
@ -284,6 +284,32 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
|
|||
translation_key="on",
|
||||
),
|
||||
),
|
||||
"FRE": (
|
||||
HonBinarySensorEntityDescription(
|
||||
key="quickModeZ1",
|
||||
name="Super Cool",
|
||||
icon="mdi:snowflake",
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
on_value=1,
|
||||
translation_key="super_cool",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="quickModeZ2",
|
||||
name="Super Freeze",
|
||||
icon="mdi:snowflake-variant",
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
on_value=1,
|
||||
translation_key="super_freeze",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="doorStatusZ2",
|
||||
name="Door Status",
|
||||
icon="mdi:fridge",
|
||||
device_class=BinarySensorDeviceClass.DOOR,
|
||||
on_value=1,
|
||||
translation_key="door_open",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
BINARY_SENSORS["WD"] = unique_entities(BINARY_SENSORS["WM"], BINARY_SENSORS["TD"])
|
||||
|
|
|
@ -38,6 +38,20 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
|
|||
translation_key="stop_program",
|
||||
),
|
||||
),
|
||||
"FRE": (
|
||||
ButtonEntityDescription(
|
||||
key="startProgram",
|
||||
name="Program Start",
|
||||
icon="mdi:play",
|
||||
translation_key="start_program",
|
||||
),
|
||||
ButtonEntityDescription(
|
||||
key="stopProgram",
|
||||
name="Program Stop",
|
||||
icon="mdi:stop",
|
||||
translation_key="stop_program",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -153,7 +153,9 @@ class HonACClimateEntity(HonEntity, ClimateEntity):
|
|||
SWING_BOTH,
|
||||
]
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.TURN_ON
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.SWING_MODE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
|
@ -295,11 +297,16 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
|||
) -> None:
|
||||
super().__init__(hass, entry, device, description)
|
||||
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TURN_ON | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
)
|
||||
|
||||
self._attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
self._set_temperature_bound()
|
||||
|
||||
self._attr_hvac_modes = [description.mode]
|
||||
if "stopProgram" in device.commands:
|
||||
self._attr_supported_features |= ClimateEntityFeature.TURN_OFF
|
||||
self._attr_hvac_modes += [HVACMode.OFF]
|
||||
modes = []
|
||||
else:
|
||||
|
@ -317,13 +324,8 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
|||
modes.append(mode)
|
||||
|
||||
if modes:
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||
self._attr_preset_modes = modes
|
||||
else:
|
||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
|
||||
self._handle_coordinator_update(update=False)
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ APPLIANCES: dict[str, str] = {
|
|||
"AP": "Air Purifier",
|
||||
"AS": "Air Scanner",
|
||||
"DW": "Dish Washer",
|
||||
"FRE": "Freezer",
|
||||
"HO": "Hood",
|
||||
"IH": "Induction Hob",
|
||||
"MW": "Microwave",
|
||||
|
@ -70,16 +71,23 @@ HON_FAN: dict[int, str] = {
|
|||
|
||||
# These languages are official supported by hOn
|
||||
LANGUAGES: list[str] = [
|
||||
"ar", # Arabic
|
||||
"bg", # Bulgarian
|
||||
"cs", # Czech
|
||||
"da", # Danish
|
||||
"de", # German
|
||||
"el", # Greek
|
||||
"en", # English
|
||||
"es", # Spanish
|
||||
"fi", # Finnish
|
||||
"fr", # French
|
||||
"he", # Hebrew
|
||||
"hr", # Croatian
|
||||
"hu", # Hungarian
|
||||
"it", # Italian
|
||||
"nb", # Norwegian
|
||||
"nl", # Dutch
|
||||
"nr", # Southern Ndebele
|
||||
"pl", # Polish
|
||||
"pt", # Portuguese
|
||||
"ro", # Romanian
|
||||
|
@ -87,7 +95,9 @@ LANGUAGES: list[str] = [
|
|||
"sk", # Slovak
|
||||
"sl", # Slovenian
|
||||
"sr", # Serbian
|
||||
"sv", # Swedish
|
||||
"tr", # Turkish
|
||||
"uk", # Ukrainian
|
||||
"zh", # Chinese
|
||||
]
|
||||
|
||||
|
|
|
@ -42,6 +42,13 @@ LIGHTS: dict[str, tuple[LightEntityDescription, ...]] = {
|
|||
translation_key="light",
|
||||
),
|
||||
),
|
||||
"DW": (
|
||||
LightEntityDescription(
|
||||
key="settings.lightStatus",
|
||||
name="Light status",
|
||||
translation_key="light",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"iot_class": "cloud_polling",
|
||||
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
||||
"requirements": [
|
||||
"pyhOn==0.16.0"
|
||||
"pyhOn==0.16.1"
|
||||
],
|
||||
"version": "0.13.0"
|
||||
"version": "0.14.0-beta.1"
|
||||
}
|
||||
|
|
|
@ -139,6 +139,12 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
|||
icon="mdi:water",
|
||||
translation_key="water_hard",
|
||||
),
|
||||
HonNumberEntityDescription(
|
||||
key="settings.waterHard",
|
||||
name="Water hard",
|
||||
icon="mdi:water",
|
||||
translation_key="water_hard",
|
||||
),
|
||||
),
|
||||
"AC": (
|
||||
HonNumberEntityDescription(
|
||||
|
|
|
@ -184,6 +184,26 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
|||
translation_key="mode",
|
||||
),
|
||||
),
|
||||
"FRE": (
|
||||
HonConfigSelectEntityDescription(
|
||||
key="startProgram.program",
|
||||
name="Program",
|
||||
translation_key="programs_ref",
|
||||
),
|
||||
HonConfigSelectEntityDescription(
|
||||
key="startProgram.zone",
|
||||
name="Zone",
|
||||
icon="mdi:radiobox-marked",
|
||||
translation_key="ref_zones",
|
||||
),
|
||||
HonSelectEntityDescription(
|
||||
key="settings.tempSelZ3",
|
||||
name="Temperature",
|
||||
icon="mdi:thermometer",
|
||||
unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="temperature",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
SELECTS["WD"] = unique_entities(SELECTS["WM"], SELECTS["TD"])
|
||||
|
|
|
@ -780,6 +780,29 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
translation_key="air_quality",
|
||||
),
|
||||
),
|
||||
"FRE": (
|
||||
HonSensorEntityDescription(
|
||||
key="tempEnv",
|
||||
name="Room Temperature",
|
||||
icon="mdi:home-thermometer-outline",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="room_temperature",
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="tempSelZ3",
|
||||
name="Temperature",
|
||||
icon="mdi:snowflake-thermometer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="temperature",
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
|
||||
),
|
||||
),
|
||||
}
|
||||
SENSORS["WD"] = unique_entities(SENSORS["WM"], SENSORS["TD"])
|
||||
|
||||
|
|
|
@ -269,6 +269,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
icon="mdi:volume-off",
|
||||
translation_key="buzzer",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.tabStatus",
|
||||
name="Tab Status",
|
||||
icon="mdi:silverware-clean",
|
||||
# translation_key="buzzer",
|
||||
),
|
||||
),
|
||||
"AC": (
|
||||
HonSwitchEntityDescription(
|
||||
|
@ -375,6 +381,20 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
translation_key="touch_tone",
|
||||
),
|
||||
),
|
||||
"FRE": (
|
||||
HonSwitchEntityDescription(
|
||||
key="quickModeZ2",
|
||||
name="Super Freeze",
|
||||
icon="mdi:snowflake-variant",
|
||||
translation_key="super_freeze",
|
||||
),
|
||||
HonSwitchEntityDescription(
|
||||
key="quickModeZ1",
|
||||
name="Super Cool",
|
||||
icon="mdi:snowflake",
|
||||
translation_key="super_cool",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
SWITCHES["WD"] = unique_entities(SWITCHES["WD"], SWITCHES["WM"])
|
||||
|
|
Loading…
Reference in New Issue