Skip to content

Commit

Permalink
🔥 deprecate aux heat for climate
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Feb 22, 2025
1 parent 87bd175 commit 5127333
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions custom_components/xiaomi_miot/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class BaseClimateEntity(BaseEntity):
_attr_swing_horizontal_mode = None
_attr_swing_horizontal_modes = None
_attr_temperature_unit = None
_attr_is_aux_heat = None

def on_init(self):
self._attr_hvac_modes = []
Expand Down Expand Up @@ -161,7 +160,6 @@ class ClimateEntity(XEntity, BaseClimateEntity):
_conv_speed = None
_conv_swing = None
_conv_swing_h = None
_conv_heater = None
_conv_target_temp = None
_conv_current_temp = None
_conv_target_humidity = None
Expand Down Expand Up @@ -212,9 +210,6 @@ def on_init(self):
self._conv_swing_h = conv
self._attr_swing_horizontal_modes = [SWING_ON, SWING_OFF]
self._attr_supported_features |= ClimateEntityFeature.SWING_HORIZONTAL_MODE
elif prop.in_list(['heater']):
self._conv_heater = conv
self._attr_supported_features |= ClimateEntityFeature.AUX_HEAT
elif prop.in_list(['target_temperature']):
self._conv_target_temp = conv
self._attr_min_temp = prop.range_min()
Expand Down Expand Up @@ -270,10 +265,6 @@ def set_state(self, data: dict):
self._attr_swing_horizontal_mode = SWING_ON if val else SWING_OFF

self.update_bind_sensor()
if self._conv_heater:
val = self._conv_heater.value_from_dict(data)
if val is not None:
self._attr_is_aux_heat = val in [True, 1, 'On']
if self._conv_target_temp:
val = self._conv_target_temp.value_from_dict(data)
if val is not None:
Expand Down Expand Up @@ -372,16 +363,6 @@ async def async_set_swing_horizontal_mode(self, swing_horizontal_mode: str):
return
await self.device.async_write({self._conv_swing_h.full_name: swing_horizontal_mode == SWING_ON})

async def async_turn_aux_heat_on(self):
if not self._conv_heater:
return
await self.device.async_write({self._conv_heater.full_name: True})

async def async_turn_aux_heat_off(self):
if not self._conv_heater:
return
await self.device.async_write({self._conv_heater.full_name: False})

XEntity.CLS[ENTITY_DOMAIN] = ClimateEntity


Expand Down

0 comments on commit 5127333

Please sign in to comment.