diff --git a/custom_components/luxtronik/climate.py b/custom_components/luxtronik/climate.py index d124e6d..fc77af1 100644 --- a/custom_components/luxtronik/climate.py +++ b/custom_components/luxtronik/climate.py @@ -103,8 +103,7 @@ hvac_mode_mapping=HVAC_MODE_MAPPING_HEAT, hvac_action_mapping=HVAC_ACTION_MAPPING_HEAT, preset_modes=[PRESET_NONE, PRESET_AWAY, PRESET_BOOST], - supported_features=ClimateEntityFeature.AUX_HEAT - | ClimateEntityFeature.PRESET_MODE # noqa: W503 + supported_features=ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TARGET_TEMPERATURE, # noqa: W503 luxtronik_key=LuxParameter.P0003_MODE_HEATING, # luxtronik_key_current_temperature=LuxCalculation.C0227_ROOM_THERMOSTAT_TEMPERATURE, @@ -172,7 +171,7 @@ class LuxtronikClimateExtraStoredData(ExtraStoredData): _attr_target_temperature: float | None = None _attr_hvac_mode: HVACMode | str | None = None _attr_preset_mode: str | None = None - _attr_is_aux_heat: bool | None = None + # _attr_is_aux_heat: bool | None = None last_hvac_mode_before_preset: str | None = None def as_dict(self) -> dict[str, Any]: @@ -194,7 +193,7 @@ class LuxtronikThermostat(LuxtronikEntity, ClimateEntity, RestoreEntity): _attr_target_temperature_low = 18.0 _attr_target_temperature_step = 0.5 - _attr_is_aux_heat: bool | None = None + # _attr_is_aux_heat: bool | None = None _attr_hvac_mode: HVACMode | str | None = None _attr_preset_mode: str | None = None @@ -254,10 +253,10 @@ def _handle_coordinator_update( if lux_action is None else self.entity_description.hvac_action_mapping[lux_action] ) - self._attr_is_aux_heat = ( - None if mode is None else mode == LuxMode.second_heatsource.value - ) - if self._attr_preset_mode == PRESET_NONE or self._attr_is_aux_heat: + # self._attr_is_aux_heat = ( + # None if mode is None else mode == LuxMode.second_heatsource.value + # ) + if self._attr_preset_mode == PRESET_NONE: # or self._attr_is_aux_heat: self._last_hvac_mode_before_preset = None key = self.entity_description.luxtronik_key_current_temperature if isinstance(key, str): @@ -339,27 +338,27 @@ async def async_set_preset_mode(self, preset_mode: str) -> None: lux_mode = LuxMode.off.value await self._async_set_lux_mode(lux_mode) - async def async_turn_aux_heat_on(self) -> None: - """Turn auxiliary heater on.""" - self._attr_is_aux_heat = True - if self._last_hvac_mode_before_preset is None: - self._last_hvac_mode_before_preset = self._attr_hvac_mode - await self._async_set_lux_mode(LuxMode.second_heatsource.value) - - async def async_turn_aux_heat_off(self) -> None: - """Turn auxiliary heater off.""" - self._attr_is_aux_heat = False - if (self._last_hvac_mode_before_preset is None) or ( - not self._last_hvac_mode_before_preset in HVAC_PRESET_MAPPING - ): - await self._async_set_lux_mode(LuxMode.automatic.value) - else: - lux_mode = [ - k - for k, v in HVAC_PRESET_MAPPING.items() - if v == self._last_hvac_mode_before_preset - ][0] - await self._async_set_lux_mode(lux_mode) + # async def async_turn_aux_heat_on(self) -> None: + # """Turn auxiliary heater on.""" + # self._attr_is_aux_heat = True + # if self._last_hvac_mode_before_preset is None: + # self._last_hvac_mode_before_preset = self._attr_hvac_mode + # await self._async_set_lux_mode(LuxMode.second_heatsource.value) + + # async def async_turn_aux_heat_off(self) -> None: + # """Turn auxiliary heater off.""" + # self._attr_is_aux_heat = False + # if (self._last_hvac_mode_before_preset is None) or ( + # not self._last_hvac_mode_before_preset in HVAC_PRESET_MAPPING + # ): + # await self._async_set_lux_mode(LuxMode.automatic.value) + # else: + # lux_mode = [ + # k + # for k, v in HVAC_PRESET_MAPPING.items() + # if v == self._last_hvac_mode_before_preset + # ][0] + # await self._async_set_lux_mode(lux_mode) @property def extra_restore_state_data(self) -> LuxtronikClimateExtraStoredData: @@ -368,6 +367,6 @@ def extra_restore_state_data(self) -> LuxtronikClimateExtraStoredData: self._attr_target_temperature, self._attr_hvac_mode, self._attr_preset_mode, - self._attr_is_aux_heat, + # self._attr_is_aux_heat, self._last_hvac_mode_before_preset, ) diff --git a/custom_components/luxtronik/const.py b/custom_components/luxtronik/const.py index 3b9f127..9fe9d50 100644 --- a/custom_components/luxtronik/const.py +++ b/custom_components/luxtronik/const.py @@ -172,7 +172,7 @@ class LuxStatus3Option(StrEnum): thermal_desinfection: Final = ("thermal desinfection",) cooling: Final = ("cooling",) swimming_pool_solar: Final = ("swimming pool/solar",) - heating_external_energy_source: Final = ("heating external engery source",) + heating_external_energy_source: Final = ("heating external energy source",) domestic_water_external_energy_source: Final = ( "domestic water external energy source", ) diff --git a/custom_components/luxtronik/lux_helper.py b/custom_components/luxtronik/lux_helper.py index 3757a07..ea36081 100644 --- a/custom_components/luxtronik/lux_helper.py +++ b/custom_components/luxtronik/lux_helper.py @@ -6,7 +6,6 @@ import struct import threading import time -import asyncio from async_timeout import timeout diff --git a/custom_components/luxtronik/manifest.json b/custom_components/luxtronik/manifest.json index a8f1a21..5bf1d90 100755 --- a/custom_components/luxtronik/manifest.json +++ b/custom_components/luxtronik/manifest.json @@ -9,7 +9,7 @@ "after_dependencies": [], "codeowners": ["@BenPru"], "iot_class": "local_polling", - "version": "2023.11.30", + "version": "2024.9.23", "homeassistant": "2023.1.0", "dhcp": [ { "macaddress": "000E8C*" },