mirror of https://github.com/Andre0512/hon.git
Small improvements
This commit is contained in:
parent
6e8576c7bd
commit
38a67ad64c
|
@ -153,7 +153,9 @@ class HonACClimateEntity(HonEntity, ClimateEntity):
|
||||||
SWING_BOTH,
|
SWING_BOTH,
|
||||||
]
|
]
|
||||||
self._attr_supported_features = (
|
self._attr_supported_features = (
|
||||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
ClimateEntityFeature.TURN_ON
|
||||||
|
| ClimateEntityFeature.TURN_OFF
|
||||||
|
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
| ClimateEntityFeature.FAN_MODE
|
| ClimateEntityFeature.FAN_MODE
|
||||||
| ClimateEntityFeature.SWING_MODE
|
| ClimateEntityFeature.SWING_MODE
|
||||||
| ClimateEntityFeature.PRESET_MODE
|
| ClimateEntityFeature.PRESET_MODE
|
||||||
|
@ -295,11 +297,17 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(hass, entry, device, description)
|
super().__init__(hass, entry, device, description)
|
||||||
|
|
||||||
|
self._attr_supported_features = (
|
||||||
|
ClimateEntityFeature.TURN_ON
|
||||||
|
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
|
)
|
||||||
|
|
||||||
self._attr_temperature_unit = UnitOfTemperature.CELSIUS
|
self._attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||||
self._set_temperature_bound()
|
self._set_temperature_bound()
|
||||||
|
|
||||||
self._attr_hvac_modes = [description.mode]
|
self._attr_hvac_modes = [description.mode]
|
||||||
if "stopProgram" in device.commands:
|
if "stopProgram" in device.commands:
|
||||||
|
self._attr_supported_features |= ClimateEntityFeature.TURN_OFF
|
||||||
self._attr_hvac_modes += [HVACMode.OFF]
|
self._attr_hvac_modes += [HVACMode.OFF]
|
||||||
modes = []
|
modes = []
|
||||||
else:
|
else:
|
||||||
|
@ -317,13 +325,8 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
||||||
modes.append(mode)
|
modes.append(mode)
|
||||||
|
|
||||||
if modes:
|
if modes:
|
||||||
self._attr_supported_features = (
|
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
|
||||||
| ClimateEntityFeature.PRESET_MODE
|
|
||||||
)
|
|
||||||
self._attr_preset_modes = modes
|
self._attr_preset_modes = modes
|
||||||
else:
|
|
||||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
|
||||||
|
|
||||||
self._handle_coordinator_update(update=False)
|
self._handle_coordinator_update(update=False)
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,13 @@ LIGHTS: dict[str, tuple[LightEntityDescription, ...]] = {
|
||||||
translation_key="light",
|
translation_key="light",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
"DW": (
|
||||||
|
LightEntityDescription(
|
||||||
|
key="settings.lightStatus",
|
||||||
|
name="Light status",
|
||||||
|
translation_key="light",
|
||||||
|
),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
"issue_tracker": "https://github.com/Andre0512/hon/issues",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pyhOn==0.16.0"
|
"pyhOn==0.16.1"
|
||||||
],
|
],
|
||||||
"version": "0.13.0"
|
"version": "0.13.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,12 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||||
icon="mdi:water",
|
icon="mdi:water",
|
||||||
translation_key="water_hard",
|
translation_key="water_hard",
|
||||||
),
|
),
|
||||||
|
HonNumberEntityDescription(
|
||||||
|
key="settings.waterHard",
|
||||||
|
name="Water hard",
|
||||||
|
icon="mdi:water",
|
||||||
|
translation_key="water_hard",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
"AC": (
|
"AC": (
|
||||||
HonNumberEntityDescription(
|
HonNumberEntityDescription(
|
||||||
|
|
|
@ -269,6 +269,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||||
icon="mdi:volume-off",
|
icon="mdi:volume-off",
|
||||||
translation_key="buzzer",
|
translation_key="buzzer",
|
||||||
),
|
),
|
||||||
|
HonConfigSwitchEntityDescription(
|
||||||
|
key="startProgram.tabStatus",
|
||||||
|
name="Tab Status",
|
||||||
|
icon="mdi:silverware-clean",
|
||||||
|
# translation_key="buzzer",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
"AC": (
|
"AC": (
|
||||||
HonSwitchEntityDescription(
|
HonSwitchEntityDescription(
|
||||||
|
|
Loading…
Reference in New Issue